The small worldness module

Small worldness class.

class hcga.features.small_worldness.SmallWorldness(graph=None)[source]

Small worldness class.

Fetures based on small-worldness, where 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.

Small world calculations using networkx:

Networkx_omega

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.

Initialise a feature class.

Parameters

graph (Graph) – graph for initialisation, converted to given encoding

compute_features()[source]

Main feature extraction function.

This function should be used by each specific feature class to add new features.