networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
newman_betweenness_centrality(G, v=None, cutoff=None, normalized=True, weight=None)

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

Notes

Load centrality is slightly different than betweenness. It was originally introduced by . For this load algorithm see .

Parameters

G : graph

A networkx graph.

normalized : bool, optional (default=True)

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

weight : None or string, optional (default=None)

If None, edge weights are ignored. Otherwise holds the name of the edge attribute used as weight. The weight of an edge is treated as the length or distance between the two sides.

cutoff : bool, optional (default=None)

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

Returns

nodes : dictionary

Dictionary of nodes with centrality as the value.

Compute load centrality for nodes.

See Also

betweenness_centrality

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/centrality/load.py#9
type: <class 'function'>
Commit: