latapy_clustering(G, nodes=None, mode='dot')
The bipartie clustering coefficient is a measure of local density of connections defined as :
$$c_u = \frac{\sum_{v \in N(N(u))} c_{uv} }{|N(N(u))|}$$where :None:None:`N(N(u))`
are the second order neighbors of u
in G
excluding u
, and :None:None:`c_{uv}`
is the pairwise clustering coefficient between nodes u
and :None:None:`v`
.
The mode selects the function for :None:None:`c_{uv}`
which can be:
:None:None:`dot`
:
:None:None:`min`
:
:None:None:`max`
:
A bipartite graph
Compute bipartite clustering for these nodes. The default is all nodes in G.
The pariwise bipartite clustering method to be used in the computation. It must be "dot", "max", or "min".
A dictionary keyed by node with the clustering coefficient value.
Compute a bipartite clustering coefficient for nodes.
>>> from networkx.algorithms import bipartite
... G = nx.path_graph(4) # path graphs are bipartite
... c = bipartite.clustering(G)
... c[0] 0.5
>>> c = bipartite.clustering(G, mode="min")See :
... c[0] 1.0
The following pages refer to to this document either explicitly or contain code examples using this.
networkx.algorithms.bipartite.cluster.latapy_clustering
networkx.algorithms.bipartite.cluster.robins_alexander_clustering
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