Class 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.
    • 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 instance
        params - Model's hyper-parameters values
      • DeepMF

        public DeepMF​(DataModel datamodel,
                      int[] numFactors,
                      int[] numIters,
                      double[] learningRate,
                      double[] regularization)
        Model constructor
        Parameters:
        datamodel - DataModel instance
        numFactors - int array with the number of latent factors of each factorization
        numIters - int array with the number of iterations of each factorization
        learningRate - double array with the learning rate hyper-parameter of each factorization
        regularization - 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 instance
        numFactors - int array with the number of latent factors of each factorization
        numIters - int array with the number of iterations of each factorization
        learningRate - double array with the learning rate hyper-parameter of each factorization
        regularization - double array with the regularization hyper-parameter of each factorization
        seed - 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 class Recommender
      • predict

        public double predict​(int userIndex,
                              int itemIndex)
        Description copied from class: Recommender
        Computes a rating prediction
        Specified by:
        predict in class Recommender
        Parameters:
        userIndex - Index of the user in the array of Users of the DataModel instance
        itemIndex - Index of the item in the array of Items of the DataModel instance
        Returns:
        Prediction