netcenlib.algorithms.algebraic_centrality module

Algebraic centrality measure implementation.

netcenlib.algorithms.algebraic_centrality.algebraic_centrality(network: Graph, alpha: float = 0.85, max_iter: int = 100, tol: float = 1e-06) dict[str, float][source]

Compute the Algebraic Centrality for each node in the graph G.

Ref: https://www.centiserver.org/centrality/Algebraic_Centrality/

Parameters:
  • network – NetworkX graph

  • alpha – Damping factor representing the probability of continuing a random walk.

  • max_iter – Maximum number of iterations for the algorithm.

  • tol – Tolerance for convergence - the algorithm stops if changes are below this value.

Returns:

Dictionary of nodes with computed centrality as the value