Graph-based

Summary

lightgcn.LightGCN.LightGCN(data, config, …)

LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation

ngcf.NGCF.NGCF(data, config, params, *args, …)

Neural Graph Collaborative Filtering

LightGCN

class elliot.recommender.graph_based.lightgcn.LightGCN.LightGCN(data, config, params, *args, **kwargs)[source]

Bases: elliot.recommender.recommender_utils_mixin.RecMixin, elliot.recommender.base_recommender_model.BaseRecommenderModel

LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation

For further details, please refer to the paper

Parameters
  • lr – Learning rate

  • epochs – Number of epochs

  • factors – Number of latent factors

  • batch_size – Batch size

  • l_w – Regularization coefficient

  • n_layers – Number of embedding propagation layers

  • n_fold – Number of folds to split the adjacency matrix into sub-matrices and ease the computation

To include the recommendation model, add it to the config file adopting the following pattern:

models:
  LightGCN:
    meta:
      save_recs: True
    lr: 0.0005
    epochs: 50
    batch_size: 512
    factors: 64
    batch_size: 256
    l_w: 0.1
    n_layers: 1
    n_fold: 5

NGCF

class elliot.recommender.graph_based.ngcf.NGCF.NGCF(data, config, params, *args, **kwargs)[source]

Bases: elliot.recommender.recommender_utils_mixin.RecMixin, elliot.recommender.base_recommender_model.BaseRecommenderModel

Neural Graph Collaborative Filtering

For further details, please refer to the paper

Parameters
  • lr – Learning rate

  • epochs – Number of epochs

  • factors – Number of latent factors

  • batch_size – Batch size

  • l_w – Regularization coefficient

  • weight_size – Tuple with number of units for each embedding propagation layer

  • node_dropout – Tuple with dropout rate for each node

  • message_dropout – Tuple with dropout rate for each embedding propagation layer

  • n_fold – Number of folds to split the adjacency matrix into sub-matrices and ease the computation

To include the recommendation model, add it to the config file adopting the following pattern:

models:
  NGCF:
    meta:
      save_recs: True
    lr: 0.0005
    epochs: 50
    batch_size: 512
    factors: 64
    batch_size: 256
    l_w: 0.1
    weight_size: (64,)
    node_dropout: ()
    message_dropout: (0.1,)
    n_fold: 5