topobench.transforms.liftings.graph2hypergraph.khop_lifting module#

This module implements the k-hop lifting of graphs to hypergraphs.

class Graph2HypergraphLifting(**kwargs)#

Bases: GraphLifting

Abstract class for lifting graphs to hypergraphs.

Parameters:
**kwargsoptional

Additional arguments for the class.

__init__(**kwargs)#
class HypergraphKHopLifting(k_value=1, **kwargs)#

Bases: Graph2HypergraphLifting

Lift graph to hypergraphs by considering k-hop neighborhoods.

The class transforms graphs to hypergraph domain by considering k-hop neighborhoods of a node. This lifting extracts a number of hyperedges equal to the number of nodes in the graph.

Parameters:
k_valueint, optional

The number of hops to consider. Default is 1.

**kwargsoptional

Additional arguments for the class.

__init__(k_value=1, **kwargs)#
lift_topology(data)#

Lift a graphs to hypergraphs by considering k-hop neighborhoods.

Parameters:
datatorch_geometric.data.Data

The input data to be lifted.

Returns:
dict

The lifted topology.