# networkx.algorithms.smallworld.omega¶

omega(G, niter=100, nrand=10, seed=None)[source]

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) ranges between -1 and 1. Values close to 0 means the G features small-world characteristics. Values close to -1 means G has a lattice shape whereas values close to 1 means G is a random graph.

Parameters: G (NetworkX graph) – An undirected graph. niter (integer (optional, default=100)) – 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 average clustering coefficient (Cr) and average shortest path length (Lr). seed (integer, random_state, or None (default)) – Indicator of random number generation state. See Randomness. omega – The small-work coefficient (omega) float

Notes

The implementation is adapted from the algorithm by Telesford et al. [1].

References

 [1] 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.