easygraph.model.hypergraphs.dhcf module#
- class easygraph.model.hypergraphs.dhcf.DHCF(*args: Any, **kwargs: Any)[source]#
Bases:
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 to3
.drop_rate (
float
) – The dropout probability. Defaults to0.5
.
- forward(hg_ui: Hypergraph, hg_iu: Hypergraph) Tuple[torch.Tensor, torch.Tensor] [source]#
The forward function.
- Parameters:
hg_ui (
eg.Hypergraph
) – The hypergraph structure that users as vertices.hg_iu (
eg.Hypergraph
) – The hypergraph structure that items as vertices.