0

I'm using Python to stream from twitter based on keyword, convert to network with GraphiPy, then using NetworkX to perform pagerank and other algos on the nodelist. My issue is that the PageRank values are all funky-- very obviously low importance nodes (nodes with very low degrees relatively) are scoring higher than their high degree counterparts. Basically the results make no sense. Exporting the node/edge list to Gephi yields entirely different results for PageRank (and other algos).

I've tried fiddling with the parameters, but short of just implementing a PageRank algo directly, I don't see what I can do to get NetworkX PageRank (and other algos) to work properly.

Is there something basic I may be missing?

  • I bet that there is a bug somewhere in your code. Sight unseen, I can't guess what the bug specifically is. But this is a common experience that we all go through repeatedly. – btilly Mar 04 '21 at 16:27
  • Can you share your code? – bsheps Mar 04 '21 at 16:45
  • My thoughts are it has something to do with how GraphiPy is converting nodes/edges to NetworkX, although I'm using the pandas implementation so I was assuming it should just work since NetworkX brings in directly from pd. – Preston Tesvich Mar 04 '21 at 16:47
  • 1
    I found another commenter somewhere that pointed out problems with float conversions on edge weights, and to set weight=1.0, which worked-- in case anyone else has this problem in the future! – Preston Tesvich Mar 05 '21 at 19:43
  • Great that you found answer to your question but please share a code snippet or at least the link to the other post where you found a hint – Yannis P. Mar 24 '21 at 08:02

0 Answers0