Generative Adversarial Networks (GANs)

Elliot integrates, to date, 50 recommendation models partitioned into two sets. The first set includes 38 popular models implemented in at least two of frameworks reviewed in this work (i.e., adopting a framework-wise popularity notion).

Summary

IRGAN.irgan.IRGAN(data, config, params, …)

IRGAN: A Minimax Game for Unifying Generative and Discriminative Information Retrieval Models

CFGAN.cfgan.CFGAN(data, config, params, …)

CFGAN: A Generic Collaborative Filtering Framework based on Generative Adversarial Networks

IRGAN

class elliot.recommender.gan.IRGAN.irgan.IRGAN(data, config, params, *args, **kwargs)[source]

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

IRGAN: A Minimax Game for Unifying Generative and Discriminative Information Retrieval Models

For further details, please refer to the paper

Parameters
  • factors – Number of latent factor

  • lr – Learning rate

  • l_w – Regularization coefficient

  • l_b – Regularization coefficient of bias

  • l_gan – Adversarial regularization coefficient

  • predict_model – Specification of the model to generate the recommendation (Generator/ Discriminator)

  • g_epochs – Number of epochs to train the generator for each IRGAN step

  • d_epochs – Number of epochs to train the discriminator for each IRGAN step

  • g_pretrain_epochs – Number of epochs to pre-train the generator

  • d_pretrain_epochs – Number of epochs to pre-train the discriminator

  • sample_lambda – Temperature Parameters

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

models:
  IRGAN:
    meta:
      save_recs: True
    epochs: 10
    factors: 10
    lr: 0.001
    l_w: 0.1
    l_b: 0.001
    l_gan: 0.001
    predict_model: generator
    g_epochs: 5
    d_epochs: 1
    g_pretrain_epochs: 10
    d_pretrain_epochs: 10
    sample_lambda: 0.2

CFGAN

class elliot.recommender.gan.CFGAN.cfgan.CFGAN(data, config, params, *args, **kwargs)[source]

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

CFGAN: A Generic Collaborative Filtering Framework based on Generative Adversarial Networks

For further details, please refer to the paper

Parameters
  • factors – Number of latent factor

  • lr – Learning rate

  • l_w – Regularization coefficient

  • l_b – Regularization coefficient of bias

  • l_gan – Adversarial regularization coefficient

  • g_epochs – Number of epochs to train the generator for each IRGAN step

  • d_epochs – Number of epochs to train the discriminator for each IRGAN step

  • s_zr – Sampling parameter of zero-reconstruction

  • s_pm – Sampling parameter of partial-masking

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

models:
  CFGAN:
    meta:
      save_recs: True
    epochs: 10
    factors: 10
    lr: 0.001
    l_w: 0.1
    l_b: 0.001
    l_gan: 0.001
    g_epochs: 5
    d_epochs: 1
    s_zr: 0.001
    s_pm: 0.001