elliot.recommender.latent_factor_models.BPRMF package

Submodules

elliot.recommender.latent_factor_models.BPRMF.BPRMF module

Module description:

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

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

Bayesian Personalized Ranking with Matrix Factorization

For further details, please refer to the paper

Parameters
  • factors – Number of latent factors

  • lr – Learning rate

  • bias_regularization – Regularization coefficient for the bias

  • user_regularization – Regularization coefficient for user latent factors

  • positive_item_regularization – Regularization coefficient for positive item latent factors

  • negative_item_regularization – Regularization coefficient for negative item latent factors

  • update_negative_item_factors

  • update_users

  • update_items

  • update_bias

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

models:
  BPRMF:
    meta:
      save_recs: True
    epochs: 10
    factors: 10
    lr: 0.001
    bias_regularization: 0
    user_regularization: 0.0025
    positive_item_regularization: 0.0025
    negative_item_regularization: 0.0025
    update_negative_item_factors: True
    update_users: True
    update_items: True
    update_bias: True
get_recommendations(k: int = 10)[source]
get_single_recommendation(mask, k, *args)[source]
property name
train()[source]

Module contents

Module description: