torch_geometric.transforms.RootedEgoNets
- class RootedEgoNets(num_hops: int)[source]
Bases:
RootedSubgraph
Collects rooted \(k\)-hop EgoNets for each node in the graph, as described in the “From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness” paper.
- Parameters:
num_hops (int) – the number of hops \(k\).