
Show HN: Little Ball of Fur – A Python library for graph subsampling - benitorosenberg
https://github.com/benedekrozemberczki/LittleBallOfFur
======
arathore
For those who might not be familiar, graph subsampling is a method of
extracting smaller graphs from a large graph while preserving some notion of
overall structure. The subsampling can be focused on finding representative
nodes, edges or combinations of those (as well as optimizing for some other
local or global properties).

It has applications wherever large graphs are encountered - social networks,
biological processes etc. An example application of the library could be as
follows - you have a very large graph and you want to do spectral clustering.
Throwing spectral clustering directly at such large graphs might not be
feasible, so one can first perform a node based subsampling and then apply
spectral clustering on the smaller graph on the representative nodes found by
the subsampling.

------
perfunctory

          def _check_networkx_graph(self, graph):
            try:
                if not isinstance(graph, nx.classes.graph.Graph):
                    raise TypeError("This is not a NetworkX graph. Please see requirements.")
            except:
                    exit("This is not a NetworkX graph. Please see requirements.")
    

First, I don't want any library to call exit on me. Second, what is it even
trying to do? Raising an exception and immediately catching it? At best this
is just a horrible style.

~~~
nerdponx
Yikes. Is this meant to be used in a command line application? Or are you
actually meant to call a function in your code that could crash your
application on bad input?

------
gunshai
This link at the bottom of the readme is incorrect fyi. I'm too lazy to create
a pull request sorry.

[https://littleballoffur.readthedocs.io/en/latest/notes/intro...](https://littleballoffur.readthedocs.io/en/latest/notes/introduction.html)

\--->

[https://little-ball-of-
fur.readthedocs.io/en/latest/notes/in...](https://little-ball-of-
fur.readthedocs.io/en/latest/notes/introduction.html)

~~~
benitorosenberg
TY! I fixed it.

------
kalev
Any good resources for graph theory? I know high level basics, but do not know
what subsampling is. It might be useful to add a quick explanation to the
readme.md.

~~~
benitorosenberg
The Leskovec papers in the readme are pretty good (classical pieces) I would
really recommend reading them.

~~~
travbrack
Any real world examples of something one can do with graph subsampling for
those of us in a hurry?

------
bglazer
This is fantastic. I've been looking for a strategy for graph subsampling for
my research on protein-protein interaction networks. It's a surprisingly
tricky problem, that I now don't have to worry about as much, thanks to this
library.

------
hprotagonist
when you include your test suite in your repo, consider hypothesis.rtfd.org
... and if you find yourself making new strategies for networkx, please push
them up to hypothesis as a plugin!

------
stefanpie
I'm familiar with graphs but not graph subsampling. What is graph subsampling
used for and what are some applications that can use it?

