topobench.transforms.data_manipulations.precompute_khop_features module#
Precompute the features based on KHop neighbourhoods transform.
- class PrecomputeKHopFeatures(max_hop, complex_dim, use_initial_features, **kwargs)#
Bases:
BaseTransformClass for precomputing the features of a k-hop neighbourhood features transform.
A transform that computes an aggregation of injective transformations of the k-hop neighbourhood.
- Parameters:
- max_hopint
The maximum hop neighbourhood.
- complex_dimint
The maximum dimension of the complex to evaluate.
- use_initial_featuresbool
Whether to use the initial features as the 0-hop features.
- **kwargsoptional
Additional arguments for the class.
- __init__(max_hop, complex_dim, use_initial_features, **kwargs)#
- forward(data)#
Apply the transform to the input data.
- Parameters:
- datatorch_geometric.data.Data
The input data.
- Returns:
- torch_geometric.data.Data
The transformed data.