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).

Parameters
  • in_channels (int) – \(C_{in}\) is the number of input channels.

  • hid_channels (int) – \(C_{hid}\) is the number of hidden channels.

  • num_classes (int) – The Number of class of the classification task.

  • use_mediator (str) – Whether to use mediator to transform the hyperedges to edges in the graph. Defaults to False.

  • fast (bool) – 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.

  • drop_rate (float, optional) – Dropout ratio. Defaults to 0.5.

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.