spectral_bipartivity¶
-
spectral_bipartivity(G, nodes=None, weight='weight')[source]¶ Returns the spectral bipartivity.
Parameters: Returns: sb – A single number if the keyword nodes is not specified, or a dictionary keyed by node with the spectral bipartivity contribution of that node as the value.
Return type: Examples
>>> from networkx.algorithms import bipartite >>> G = nx.path_graph(4) >>> bipartite.spectral_bipartivity(G) 1.0
Notes
This implementation uses Numpy (dense) matrices which are not efficient for storing large sparse graphs.
See also
color()References
[1] E. Estrada and J. A. Rodríguez-Velázquez, “Spectral measures of bipartivity in complex networks”, PhysRev E 72, 046105 (2005)