NetworkX

Previous topic

networkx.algorithms.centrality.eigenvector_centrality_numpy

Next topic

networkx.algorithms.centrality.edge_load

networkx.algorithms.centrality.load_centrality

networkx.algorithms.centrality.load_centrality(G, v=None, cutoff=None, normalized=True, weighted_edges=False)

Compute load centrality for nodes.

The load centrality of a node is the fraction of all shortest paths that pass through that node.

Parameters :

G : graph

A networkx graph

normalized : bool, optional

If True the betweenness values are normalized by b=b/(n-1)(n-2) where n is the number of nodes in G.

weighted_edges : bool, optional

Consider the edge weights in determining the shortest paths. If False, all edge weights are considered equal.

cutoff : bool, optional

If specified, only consider paths of length <= cutoff.

Returns :

nodes : dictionary

Dictionary of nodes with centrality as the value.

Notes

Load centrality is slightly different than betweenness. For this load algorithm see the reference Scientific collaboration networks: II. Shortest paths, weighted networks, and centrality, M. E. J. Newman, Phys. Rev. E 64, 016132 (2001).