Adversarial Learning

Summary

AMF.AMF.AMF(data, config, params, *args, …)

Adversarial Matrix Factorization

AMR.AMR.AMR(data, config, params, *args, …)

Adversarial Multimedia Recommender

AMF

class elliot.recommender.adversarial.AMF.AMF.AMF(data, config, params, *args, **kwargs)[source]

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

Adversarial Matrix Factorization

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

  • eps – Perturbation Budget

  • l_adv – Adversarial regularization coefficient

  • adversarial_epochs – Adversarial epochs

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

models:
  AMF:
    meta:
      save_recs: True
    epochs: 10
    batch_size: 512
    factors: 200
    lr: 0.001
    l_w: 0.1
    l_b: 0.001
    eps: 0.1
    l_adv: 0.001
    adversarial_epochs: 10

AMR

class elliot.recommender.adversarial.AMR.AMR.AMR(data, config, params, *args, **kwargs)[source]

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

Adversarial Multimedia Recommender

For further details, please refer to the paper

Parameters
  • factors – Number of latent factor

  • factors_d – Image-feature dimensionality

  • lr – Learning rate

  • l_w – Regularization coefficient

  • l_b – Regularization coefficient of bias

  • l_e – Regularization coefficient of image matrix embedding

  • eps – Perturbation Budget

  • l_adv – Adversarial regularization coefficient

  • adversarial_epochs – Adversarial epochs

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

models:
  AMR:
    meta:
      save_recs: True
    epochs: 10
    batch_size: 512
    factors: 200
    factors_d: 20
    lr: 0.001
    l_w: 0.1
    l_b: 0.001
    l_e: 0.1
    eps: 0.1
    l_adv: 0.001
    adversarial_epochs: 5