pythonnetworkxpagerank

Initial pagerank precomputed values with networkx


I'm trying to run an experiment where I have PageRank values and a directed graph built. I have a graph in the shape of a star (many surrounding nodes that point to a central node).

All those surrounding nodes have already a PageRank value precomputed and I want to check how the central node PageRank value is affected by the surrounding ones.

Is there a way to perform this with networkx? I've tried building the graph with weighs (using the weights to store the precomputed PageRank values) but at the end, it look does not look like the central node value changes much.


Solution

  • I will answer myself the question. In the PageRank method for NetworX you have the parameter nstart, which specifically is the starting pagerank point for the nodes.

    nstart : dictionary, optional Starting value of PageRank iteration for each node.

    Still, I'm afraid the graph structure is the limiting factor when doing the random walk and obtaining a relevant result.