Latent Factor Models¶
Summary¶
|
Bayesian Personalized Ranking with Matrix Factorization |
|
Batch Bayesian Personalized Ranking with Matrix Factorization |
|
BPR Sparse Linear Methods |
|
Collaborative Metric Learning |
Field-aware Factorization Machines |
|
|
FISM: Factored Item Similarity Models |
|
Factorization Machines |
|
For further details, please refer to the paper |
|
Logistic Matrix Factorization |
|
Matrix Factorization |
Non-Negative Matrix Factorization |
|
Probabilistic Matrix Factorization |
|
|
For further details, please refer to the paper |
|
Train a Sparse Linear Methods (SLIM) item similarity model. |
|
SVD++ |
|
Weighted XXX Matrix Factorization |
BPRMF¶
-
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
BPRMF_batch¶
-
class
elliot.recommender.latent_factor_models.BPRMF_batch.BPRMF_batch.
BPRMF_batch
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Batch Bayesian Personalized Ranking with Matrix Factorization
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
l_w – Regularization coefficient for latent factors
l_b – Regularization coefficient for bias
To include the recommendation model, add it to the config file adopting the following pattern:
models: BPRMF_batch: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 l_w: 0.1 l_b: 0.001
BPRSlim¶
-
class
elliot.recommender.latent_factor_models.BPRSlim.bprslim.
BPRSlim
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
BPR Sparse Linear Methods
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
lj_reg – Regularization coefficient for positive items
li_reg – Regularization coefficient for negative items
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: 10 lr: 0.001 lj_reg: 0.001 li_reg: 0.1
CML¶
-
class
elliot.recommender.latent_factor_models.CML.CML.
CML
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Collaborative Metric Learning
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
l_w – Regularization coefficient for latent factors
l_b – Regularization coefficient for bias
margin – Safety margin size
To include the recommendation model, add it to the config file adopting the following pattern:
models: CML: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 l_w: 0.001 l_b: 0.001 margin: 0.5
FFM¶
-
class
elliot.recommender.latent_factor_models.FFM.field_aware_factorization_machine.
FFM
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Field-aware Factorization Machines
For further details, please refer to the paper
- Parameters
factors – Number of factors of feature embeddings
lr – Learning rate
reg – Regularization coefficient
To include the recommendation model, add it to the config file adopting the following pattern:
models: FFM: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 reg: 0.1
FISM¶
-
class
elliot.recommender.latent_factor_models.FISM.FISM.
FISM
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
FISM: Factored Item Similarity Models
For further details, please refer to the paper
- Parameters
factors – Number of factors of feature embeddings
lr – Learning rate
beta – Regularization coefficient for latent factors
lambda – Regularization coefficient for user bias
gamma – Regularization coefficient for item bias
alpha – Alpha parameter (a value between 0 and 1)
neg_ratio – ratio of sampled negative items
To include the recommendation model, add it to the config file adopting the following pattern:
models: FISM: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 alpha: 0.5 beta: 0.001 lambda: 0.001 gamma: 0.001 neg_ratio: 0.5
FM¶
-
class
elliot.recommender.latent_factor_models.FM.factorization_machine.
FM
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Factorization Machines
For further details, please refer to the paper
- Parameters
factors – Number of factors of feature embeddings
lr – Learning rate
reg – Regularization coefficient
To include the recommendation model, add it to the config file adopting the following pattern:
models: FM: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 reg: 0.1
FunkSVD¶
-
class
elliot.recommender.latent_factor_models.FunkSVD.funk_svd.
FunkSVD
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
For further details, please refer to the paper
- Parameters
factors – Number of factors of feature embeddings
lr – Learning rate
reg_w – Regularization coefficient for latent factors
reg_b – Regularization coefficient for bias
To include the recommendation model, add it to the config file adopting the following pattern:
models: FunkSVD: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 reg_w: 0.1 reg_b: 0.001
LogisticMatrixFactorization¶
-
class
elliot.recommender.latent_factor_models.LogisticMF.logistic_matrix_factorization.
LogisticMatrixFactorization
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Logistic Matrix Factorization
For further details, please refer to the paper
- Parameters
factors – Number of factors of feature embeddings
lr – Learning rate
reg – Regularization coefficient
alpha – Parameter for confidence estimation
To include the recommendation model, add it to the config file adopting the following pattern:
models: LogisticMatrixFactorization: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 reg: 0.1 alpha: 0.5
NonNegMF¶
-
class
elliot.recommender.latent_factor_models.NonNegMF.non_negative_matrix_factorization.
NonNegMF
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Non-Negative Matrix Factorization
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
reg – Regularization coefficient
To include the recommendation model, add it to the config file adopting the following pattern:
models: NonNegMF: meta: save_recs: True epochs: 10 batch_size: 512 factors: 10 lr: 0.001 reg: 0.1
PMF¶
-
class
elliot.recommender.latent_factor_models.PMF.probabilistic_matrix_factorization.
PMF
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Probabilistic Matrix Factorization
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
reg – Regularization coefficient
gaussian_variance – Variance of the Gaussian distribution
To include the recommendation model, add it to the config file adopting the following pattern:
models: PMF: meta: save_recs: True epochs: 10 batch_size: 512 factors: 50 lr: 0.001 reg: 0.0025 gaussian_variance: 0.1
PureSVD¶
-
class
elliot.recommender.latent_factor_models.PureSVD.pure_svd.
PureSVD
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
seed – Random seed
To include the recommendation model, add it to the config file adopting the following pattern:
models: PureSVD: meta: save_recs: True factors: 10 seed: 42
Slim¶
-
class
elliot.recommender.latent_factor_models.Slim.slim.
Slim
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
- Train a Sparse Linear Methods (SLIM) item similarity model.
- NOTE: ElasticNet solver is parallel, a single intance of SLIM_ElasticNet will
make use of half the cores available
- See:
Efficient Top-N Recommendation by Linear Regression, M. Levy and K. Jack, LSRS workshop at RecSys 2013.
SLIM: Sparse linear methods for top-n recommender systems, X. Ning and G. Karypis, ICDM 2011. For further details, please refer to the paper
- Parameters
l1_ratio –
alpha –
To include the recommendation model, add it to the config file adopting the following pattern:
models: Slim: meta: save_recs: True l1_ratio: 0.001 alpha: 0.001
SVDpp¶
-
class
elliot.recommender.latent_factor_models.SVDpp.svdpp.
SVDpp
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
SVD++
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
reg_w – Regularization coefficient for latent factors
reg_b – Regularization coefficient for bias
To include the recommendation model, add it to the config file adopting the following pattern:
models: SVDpp: meta: save_recs: True epochs: 10 batch_size: 512 factors: 50 lr: 0.001 reg_w: 0.1 reg_b: 0.001
WRMF¶
-
class
elliot.recommender.latent_factor_models.WRMF.wrmf.
WRMF
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Weighted XXX Matrix Factorization
For further details, please refer to the paper
- Parameters
factors – Number of latent factors
lr – Learning rate
alpha –
reg – Regularization coefficient
To include the recommendation model, add it to the config file adopting the following pattern:
models: WRMF: meta: save_recs: True epochs: 10 factors: 50 alpha: 1 reg: 0.1