The independent sets module

Independent sets class.

class hcga.features.independent_sets.IndependentSets(graph=None)[source]

Independent sets class.

Features based on independent sets.

An independent set is a set of nodes such that the subgraph of G induced by these nodes contains no edges. A maximal independent set is an independent set such that it is not possible to add a new node and still get an independent set.

Uses networkx, see ‘https://networkx.org/documentation/stable/reference/algorithms/mis.html`

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.

hcga.features.independent_sets.size_max_indep_set(graph)[source]