NetworkX

Previous topic

networkx.load_centrality

Next topic

networkx.degree_centrality

networkx.edge_betweenness

edge_betweenness(G, normalized=True, weighted_edges=False, sources=None)

Compute betweenness centrality for edges.

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.

sources : node list

A list of nodes to consider as sources for shortest paths.

Returns:

nodes : dictionary

Dictionary of edges with betweeness centrality as the value.