centrality_pagerank

Computes weighted or unweighted PageRank centrality and stores the results as attributes on the graph.

sasviya.network.algorithms.centralities.centrality_pagerank(g, edge_weight=None, alpha=0.85, tolerance=1e-09, *, inplace=False, data=True)

Parameters

g : SAS graph object

Specifies the input graph to assess.

edge_weight : str or None, optional

Specifies the edge attribute that corresponds to the edge weight. The default is None, which means that unweighted PageRank centrality is computed.

alpha : float, optional

Specifies the damping parameter for the PageRank centrality (or algorithm). The default is 0.85.

tolerance : float, optional

Specifies the tolerance parameter for the PageRank centrality (or algorithm). The default is 1E-9.

inplace : bool, optional

Specifies whether to add the centrality values as attributes to the input graph directly or to create a copy of the graph. The default is False.

data : bool, optional

Specifies whether or not to retain attributes. When the value is True and the inplace parameter value is False (default values), the node and edge attributes of the graph are retained. This parameter has no effect when the inplace parameter is set to True.

Returns

SAS graph object or None

Returns a graph that contains the PageRank centrality node attributes centr_pagerank_*. This graph has the solution_summary attribute, which contains information about the results of the algorithm.

Last updated: August 18, 2026