VHRanger / CSRGraph

A tiny library for large graphs
MIT License
111 stars 17 forks source link

Future Enhancement Request : Graph Algorthims on CSRGraph #11

Open valayDave opened 3 years ago

valayDave commented 3 years ago

I like your idea. I was using Networkx and it just hogs all memory, I was looking for a python graph library for large graphs and I saw this library.

Can future enhancements support Graph Algorithms like Page Rank?

VHRanger commented 3 years ago

Hey,

Since you can access the underlying CSR matrix with G.mat directly it's easy to extend with other algorithms that take in numpy/scipy objects.

For pagerank, you could probably use something like pagerank_scipy from networkX (just the method) and throw it at the csrgraph.

Long run I want to make these things have a simpler API within this package

VHRanger commented 3 years ago

Here's an ongoing list of algorithms to implement:

wangbingnan136 commented 3 years ago

I like your idea. I was using Networkx and it just hogs all memory, I was looking for a python graph library for large graphs and I saw this library.

Can future enhancements support Graph Algorithms like Page Rank?

I think networkit is fast enough.

VHRanger commented 3 years ago

NetworkX is fast since it makes the graph into a sparse matrix before running the algorithm.

The problem with networkX is loading the large graph in the first place -- if it's too large you'll run out of RAM very fast.

We can just use the pagerank_scipy function from networkX on the csrgraph.graph.mat object but it would be nicer to have a wrapper function for it in this library

wangbingnan136 commented 3 years ago

NetworkX is fast since it makes the graph into a sparse matrix before running the algorithm.

The problem with networkX is loading the large graph in the first place -- if it's too large you'll run out of RAM very fast.

We can just use the pagerank_scipy function from networkX on the csrgraph.graph.mat object but it would be nicer to have a wrapper function for it in this library

I have used networkx and networkit. Many algorithms of networkx are operated on the dictionary-like data structure of networkx itself, so the speed is relatively slow, and networkx is not designed to accelerate parallel computing. On the contrary, networkit does this, but Networkit implements fewer graph algorithms than networkx