Return the Google matrix of the graph.
Parameters: | G : graph
alpha : float
personalization: dict, optional :
nodelist : list, optional
weight : key, optional
dangling: dict, optional :
|
---|---|
Returns: | A : NumPy matrix
|
See also
Notes
The matrix returned represents the transition matrix that describes the Markov chain used in PageRank. For PageRank to converge to a unique solution (i.e., a unique stationary distribution in a Markov chain), the transition matrix must be irreducible. In other words, it must be that there exists a path between every pair of nodes in the graph, or else there is the potential of “rank sinks.”
This implementation works with Multi(Di)Graphs. For multigraphs the weight between two nodes is set to be the sum of all edge weights between those nodes.