HyperGCN

class dhg.models.HyperGCN(*args, **kwargs)[source]

Bases: torch.nn.Module

The HyperGCN model proposed in HyperGCN: A New Method of Training Graph Convolutional Networks on Hypergraphs paper (NeurIPS 2019). :param in_channels: \(C_{in}\) is the number of input channels. :type in_channels: int :param hid_channels: \(C_{hid}\) is the number of hidden channels. :type hid_channels: int :param num_classes: The Number of class of the classification task. :type num_classes: int :param use_mediator: Whether to use mediator to transform the hyperedges to edges in the graph. Defaults to False. :type use_mediator: str :param fast: If set to True, the transformed graph structure will be computed once from the input hypergraph and vertex features, and cached for future use. Defaults to True. :type fast: bool :param drop_rate: Dropout ratio. Defaults to 0.5. :type drop_rate: float, optional

forward(X, hg)[source]

The forward function.

Parameters
  • X (torch.Tensor) – Input vertex feature matrix. Size \((N, C_{in})\).

  • hg (dhg.Hypergraph) – The hypergraph structure that contains \(N\) vertices.