NetworkX

Previous topic

pagerank_scipy

Next topic

hits

google_matrix

Return the Google matrix of the graph.

Parameters :

G : graph

A NetworkX graph

alpha : float

The damping factor

personalization: dict, optional :

The “personalization vector” consisting of a dictionary with a key for every graph node and nonzero personalization value for each node.

nodelist : list, optional

The rows and columns are ordered according to the nodes in nodelist. If nodelist is None, then the ordering is produced by G.nodes().

weight : key, optional

Edge data key to use as weight. If None weights are set to 1.

Returns :

A : NumPy matrix

Google matrix of the graph