networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
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.

Notes

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 .

Parameters

G : NetworkX graph

Undirected graph with neither parallel edges nor self-loops.

normalized : bool (optional)

Normalize using randomized network as in

Q : float (optional, default=100)

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.

seed : integer, random_state, or None (default)

Indicator of random number generation state. See Randomness<randomness> .

Returns

rc : dictionary

A dictionary, keyed by degree, with rich-club coefficient values.

Returns the rich-club coefficient of the graph G.

Examples

>>> G = nx.Graph([(0, 1), (0, 2), (1, 2), (1, 3), (1, 4), (4, 5)])
... rc = nx.rich_club_coefficient(G, normalized=False, seed=42)
... rc[0] 0.4
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.algorithms.richclub.rich_club_coefficient

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/richclub.py#10
type: <class 'function'>
Commit: