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.
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.
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?
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.
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.
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!
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.