network pagerank algorithm -- custom initial weights vs personalization

316 Views Asked by At

I am working with a graph and I want to compute the pagerank of its nodes. I want to emphasize some nodes more than others (and I use the networkx python package).

I can think of two ways of doing this:

  • start with custom initial scores, rather than 1/n for each node,
  • use personalized pagerank, so that the random walk restarts are biased towards some nodes. There are parameters for both in networkx.

Which one makes more sense? What are the benefits of one method over the other?

1

There are 1 best solutions below

0
On BEST ANSWER

Starting with custom initial scores will not change final scores: the algorithm converges towards the same result independently of its initialization. The initial scores may only have a (minor) impact on convergence speed.

Instead, personalized pagerank iteratively jumps towards the chosen set of nodes, every time a teleportation occurs. This will definitely change the final scores.

Therefore, what you want to use is personalized pagerank.

In addition, you may use the same vector for initialization, in the hope that convergence will be faster.