The scale free module

Scale Free class.

class hcga.features.scale_free.ScaleFree(graph=None)[source]

Scale Free class.

Features based on the scalefreeness of a graph. It uses the s-metric. The s-metric is defined as the sum of the products deg(u)*deg(v) for every edge (u,v) in G. If norm is provided construct the s-max graph and compute it’s s_metric, and return the normalized s value

Scale free calculations using networkx:

Networkx_scale free

References

1

Lun Li, David Alderson, John C. Doyle, and Walter Willinger, Towards a Theory of Scale-Free Graphs: Definition, Properties, and Implications (Extended Version), 2005. https://arxiv.org/abs/cond-mat/0501169

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.