0

I checked the descriptions of pagerank, pagerank_numpy and pagerank_scipy from NetworkX documentation. I can't see the difference.

pagerank(G, alpha=0.85, personalization=None, max_iter=100, tol=1e-06, nstart=None, weight='weight', dangling=None)

pagerank_numpy(G, alpha=0.85, personalization=None, weight='weight', dangling=None)

pagerank_scipy(G, alpha=0.85, personalization=None, max_iter=100, tol=1e-06, weight='weight', dangling=None)

What are the differences among them?

SparkAndShine
  • 17,001
  • 22
  • 90
  • 134

1 Answers1

2

They all compute the same thing but with slightly different methods to compute the largest eigenvalue/eigenvector (the pagerank scores).

  • pagerank is a pure-Python implementation
  • pagerank_numpy uses the dense linear algebra subpackage of numpy
  • pagerank_scipy uses the sparse linear algebra subpackage of scipy

The pagerank_scipy implementation should be fastest and use the least memory for large graphs.

SparkAndShine
  • 17,001
  • 22
  • 90
  • 134
Aric
  • 24,511
  • 5
  • 78
  • 77