'pagerank with weighted nodes in networkx

I have a DiMultigraph and I want to compute the weighted PageRank. How can I use the weight of nodes in addition to the weights of edges in this computation using Networkx?



Solution 1:[1]

PageRank is an eigenvector centrality, and node weights don't affect the output of an eigenvector centrality because the eigenvectors are related to the connectivity matrix rather than the weights of the nodes. If you do plug in weights and transmit them, after enough iterations they will cancel out and you will arrive at the original, un-node-weighted PageRank values.

I came across a paper once that altered an eigenvector centrality with a dampening method that prevented this... but I cannot find the paper after much trying. If I find it, I will update this answer :)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rjurney