betweenness_centrality(G, nodes)
Betweenness centrality of a node :None:None:`v`
is the sum of the fraction of all-pairs shortest paths that pass through :None:None:`v`
.
Values of betweenness are normalized by the maximum possible value which for bipartite graphs is limited by the relative size of the two node sets .
Let n
be the number of nodes in the node set :None:None:`U`
and :None:None:`m`
be the number of nodes in the node set :None:None:`V`
, then nodes in :None:None:`U`
are normalized by dividing by
where
$$s = (n - 1) \div m , t = (n - 1) \mod m ,$$and nodes in :None:None:`V`
are normalized by dividing by
where,
$$p = (m - 1) \div n , r = (m - 1) \mod n .$$The nodes input parameter must contain all nodes in one bipartite node set, but the dictionary returned contains all nodes from both node sets. See bipartite documentation <networkx.algorithms.bipartite>
for further details on how bipartite graphs are handled in NetworkX.
A bipartite graph
Container with all nodes in one bipartite node set.
Dictionary keyed by node with bipartite betweenness centrality as the value.
Compute betweenness centrality for nodes in a bipartite network.
The following pages refer to to this document either explicitly or contain code examples using this.
networkx.algorithms.bipartite.centrality.closeness_centrality
networkx.algorithms.bipartite.centrality.degree_centrality
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