DHCF

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

Bases: torch.nn.Module

The DHCF model proposed in Dual Channel Hypergraph Collaborative Filtering paper (KDD 2020).

Note

The user and item embeddings and trainable parameters are initialized with xavier_uniform distribution.

Parameters
  • num_users (int) – The Number of users.

  • num_items (int) – The Number of items.

  • emb_dim (int) – Embedding dimension.

  • num_layers (int) – The Number of layers. Defaults to 3.

  • drop_rate (float) – The dropout probability. Defaults to 0.5.

forward(hg_ui, hg_iu)[source]

The forward function.

Parameters
  • hg_ui (dhg.Hypergraph) – The hypergraph structure that users as vertices.

  • hg_iu (dhg.Hypergraph) – The hypergraph structure that items as vertices.