small_world_omega

small_world_omega#

graph_tool.topology.small_world_omega(g, niter=5, nrand=10)[git][source]#

Return the small-world coefficient omega of a graph.

Parameters:
gGraph

Connected undirected graph.

niterint (optional, default: 5)

Number of edge swaps per edge in each reference graph.

nrandint (optional, default: 10)

Number of reference graphs averaged.

Returns:
omegafloat

The coefficient \(\omega = L_r/L - C/C_l\).

See also

small_world_sigma

Small-world coefficient sigma

graph_tool.generation.random_rewire_connected

Degree-preserving randomization

graph_tool.generation.random_rewire_lattice

Rewiring towards a ring lattice

Notes

\(L\) is the average shortest path length and \(C\) the average local clustering coefficient; \(L_r\) is averaged over random references and \(C_l\) over lattice references with the same degrees (see random_rewire_connected() and random_rewire_lattice()) [telesford-ubiquity-2011]. It is close to zero for small-world graphs, negative for lattice-like and positive for random-like ones.

References

[telesford-ubiquity-2011]

Qawi K. Telesford, Karen E. Joyce, Satoru Hayasaka, Jonathan H. Burdette and Paul J. Laurienti, “The ubiquity of small-world networks”, Brain Connectivity 1, 367-375 (2011), DOI: 10.1089/brain.2011.0038 [sci-hub, @tor]

Examples

>>> g = gt.collection.data["karate"]
>>> print(gt.small_world_omega(g, niter=5, nrand=5))
-0...