rich_club_coefficient(G, normalized=True, Q=100, seed=None)
For each degree k, the rich-club coefficient is the ratio of the number of actual to the number of potential edges for nodes with degree greater than k:
$$\phi(k) = \frac{2 E_k}{N_k (N_k - 1)}$$where :None:None:`N_k`
is the number of nodes with degree larger than k, and :None:None:`E_k`
is the number of edges among those nodes.
The rich club definition and algorithm are found in . This algorithm ignores any edge weights and is not defined for directed graphs or graphs with parallel edges or self loops.
Estimates for appropriate values of Q
are found in .
Undirected graph with neither parallel edges nor self-loops.
Normalize using randomized network as in
If :None:None:`normalized`
is True, perform :None:None:`Q * m`
double-edge swaps, where m
is the number of edges in G
, to use as a null-model for normalization.
Indicator of random number generation state. See Randomness<randomness>
.
A dictionary, keyed by degree, with rich-club coefficient values.
Returns the rich-club coefficient of the graph G
.
>>> G = nx.Graph([(0, 1), (0, 2), (1, 2), (1, 3), (1, 4), (4, 5)])See :
... rc = nx.rich_club_coefficient(G, normalized=False, seed=42)
... rc[0] 0.4
The following pages refer to to this document either explicitly or contain code examples using this.
networkx.algorithms.richclub.rich_club_coefficient
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