Settings

Theme

Show HN: Little Ball of Fur – A Python library for graph subsampling

github.com

119 points by benitorosenberg 6 years ago · 12 comments

Reader

arathore 6 years ago

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 6 years ago

      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 6 years ago

    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 6 years ago

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://little-ball-of-fur.readthedocs.io/en/latest/notes/in...

bglazer 6 years ago

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.

kalev 6 years ago

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.

  • benitorosenbergOP 6 years ago

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

    • travbrack 6 years ago

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

    • vikiomega9 6 years ago

      Sorry, could you be more specific, do you mean his current work on Graph NN and representation learning?

hprotagonist 6 years ago

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 6 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection