The node features module

Node Features class.

class hcga.features.node_features.NodeFeatures(graph=None)[source]

Node Features class.

Features based on node features.

Here, we use the node features in various ways to compute new features.

  1. Aggregate node features (ignores graph structure).

  2. Convolute node features using message-passing, then aggregate (incorporates graph structure).

Graph convolutions follow a similar pattern to that of graph neural networks 1.

References

1

Robert L. Peach,Alexis Arnaudon,Mauricio Barahona. Semi-supervised classification on graphs using explicit diffusion dynamics, Foundations of Data Science,2,1,19,33,2020-2-11,

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.node_features.get_conv_matrix(graph)[source]

Extracting feature matrix.

hcga.features.node_features.get_feature_matrix(graph)[source]

Extracting feature matrix.