Class DeepMF
- java.lang.Object
-
- es.upm.etsisi.cf4j.recommender.Recommender
-
- es.upm.etsisi.cf4j.recommender.matrixFactorization.DeepMF
-
public class DeepMF extends Recommender
Implements Lara-Cabrera, R., González-Prieto, Á., & Ortega, F. (2020). Deep matrix factorization approach for collaborative filtering recommender systems. Applied Sciences, 10(14), 4926.
-
-
Field Summary
-
Fields inherited from class es.upm.etsisi.cf4j.recommender.Recommender
datamodel
-
-
Constructor Summary
Constructors Constructor Description DeepMF(DataModel datamodel, int[] numFactors, int[] numIters, double[] learningRate, double[] regularization)
Model constructorDeepMF(DataModel datamodel, int[] numFactors, int[] numIters, double[] learningRate, double[] regularization, long seed)
Model constructorDeepMF(DataModel datamodel, Map<String,Object> params)
Model constructor from a Map containing the model's hyper-parameters values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fit()
Estimates model parameters given the hyper-parametersdouble
predict(int userIndex, int itemIndex)
Computes a rating predictionString
toString()
-
Methods inherited from class es.upm.etsisi.cf4j.recommender.Recommender
getDataModel, predict
-
-
-
-
Constructor Detail
-
DeepMF
public DeepMF(DataModel datamodel, Map<String,Object> params)
Model constructor from a Map containing the model's hyper-parameters values. Map object must contains the following keys:- numFactors: int array with the number of latent factors of each factorization.
- numIters:: int array with the number of iterations of each factorization.
- learingRate: double array with the learning rate hyper-parameter of each factorization.
- regularization: double array with the regularization hyper-parameter of each factorization.
- seed (optional): random seed for random numbers generation. If missing, random value is used.
- Parameters:
datamodel
- DataModel instanceparams
- Model's hyper-parameters values
-
DeepMF
public DeepMF(DataModel datamodel, int[] numFactors, int[] numIters, double[] learningRate, double[] regularization)
Model constructor- Parameters:
datamodel
- DataModel instancenumFactors
- int array with the number of latent factors of each factorizationnumIters
- int array with the number of iterations of each factorizationlearningRate
- double array with the learning rate hyper-parameter of each factorizationregularization
- double array with the regularization hyper-parameter of each factorization
-
DeepMF
public DeepMF(DataModel datamodel, int[] numFactors, int[] numIters, double[] learningRate, double[] regularization, long seed)
Model constructor- Parameters:
datamodel
- DataModel instancenumFactors
- int array with the number of latent factors of each factorizationnumIters
- int array with the number of iterations of each factorizationlearningRate
- double array with the learning rate hyper-parameter of each factorizationregularization
- double array with the regularization hyper-parameter of each factorizationseed
- Seed for random numbers generation
-
-
Method Detail
-
fit
public void fit()
Description copied from class:Recommender
Estimates model parameters given the hyper-parameters- Specified by:
fit
in classRecommender
-
predict
public double predict(int userIndex, int itemIndex)
Description copied from class:Recommender
Computes a rating prediction- Specified by:
predict
in classRecommender
- Parameters:
userIndex
- Index of the user in the array of Users of the DataModel instanceitemIndex
- Index of the item in the array of Items of the DataModel instance- Returns:
- Prediction
-
-