networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersRaisesReturnsBackRef
communicability(G)

The communicability between pairs of nodes in G is the sum of walks of different lengths starting at node u and ending at node v.

Notes

This algorithm uses a spectral decomposition of the adjacency matrix. Let G=(V,E) be a simple undirected graph. Using the connection between the powers of the adjacency matrix and the number of walks in the graph, the communicability between nodes :None:None:`u` and :None:None:`v` based on the graph spectrum is

$$C(u,v)=\sum_{j=1}^{n}\phi_{j}(u)\phi_{j}(v)e^{\lambda_{j}},$$

where :None:None:`\phi_{j}(u)` is the :None:None:`u\rm{th}` element of the :None:None:`j\rm{th}` orthonormal eigenvector of the adjacency matrix associated with the eigenvalue :None:None:`\lambda_{j}`.

Parameters

G: graph :

Raises

NetworkXError

If the graph is not undirected and simple.

Returns

comm: dictionary of dictionaries

Dictionary of dictionaries keyed by nodes with communicability as the value.

Returns communicability between all pairs of nodes in G.

See Also

communicability_betweenness_centrality

Communicability betweeness centrality for each node in G.

communicability_exp

Communicability between all pairs of nodes in G using spectral decomposition.

Examples

>>> G = nx.Graph([(0, 1), (1, 2), (1, 5), (5, 4), (2, 4), (2, 3), (4, 3), (3, 6)])
... c = nx.communicability(G)
See :

Back References

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

networkx.algorithms.communicability_alg.communicability_exp networkx.algorithms.communicability_alg.communicability

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