- omega(G, niter=5, nrand=10, seed=None)#
Returns the small-world coefficient (omega) of a graph
The small-world coefficient of a graph G is:
omega = Lr/L - C/Cl
where C and L are respectively the average clustering coefficient and average shortest path length of G. Lr is the average shortest path length of an equivalent random graph and Cl is the average clustering coefficient of an equivalent lattice graph.
The small-world coefficient (omega) measures how much G is like a lattice or a random graph. Negative values mean G is similar to a lattice whereas positive values mean G is a random graph. Values close to 0 mean that G has small-world characteristics.
- GNetworkX graph
An undirected graph.
- niter: integer (optional, default=5)
Approximate number of rewiring per edge to compute the equivalent random graph.
- nrand: integer (optional, default=10)
Number of random graphs generated to compute the maximal clustering coefficient (Cr) and average shortest path length (Lr).
- seedinteger, random_state, or None (default)
Indicator of random number generation state. See Randomness.
The small-world coefficient (omega)
The implementation is adapted from the algorithm by Telesford et al. .
Telesford, Joyce, Hayasaka, Burdette, and Laurienti (2011). “The Ubiquity of Small-World Networks”. Brain Connectivity. 1 (0038): 367-75. PMC 3604768. PMID 22432451. doi:10.1089/brain.2011.0038.