Class BRISMFPredictor

  • All Implemented Interfaces:
    Configurable, Serializable, MOAObject, OptionHandler, RatingPredictor

    public class BRISMFPredictor
    extends AbstractOptionHandler
    implements RatingPredictor
    Implementation of the algorithm described in Scalable Collaborative Filtering Approaches for Large Recommender Systems (Gábor Takács, István Pilászy, Bottyán Németh, and Domonkos Tikk). A feature vector is learned for every user and item, so that the prediction of a rating is roughly the dot product of the corresponding user and item vector. Stochastic gradient descent is used to train the model, minimizing its prediction error. Both Tikhonov regularization and early stopping are used to reduce overfitting. The algorithm allows batch training (from scratch, using all ratings available at the moment) as well as incremental, by retraining only the affected user and item vectors when a new rating is inserted.

    Parameters:

    • f: features - the number of features to be trained for each user and item
    • r: learning rate - the learning rate used in the regularization
    • a: ratio - the regularization ratio to be used in the Tikhonov regularization
    • i: iterations - the number of iterations to be used when retraining user and item features (online training).
    See Also:
    Serialized Form
    • Constructor Detail

      • BRISMFPredictor

        public BRISMFPredictor()
    • Method Detail

      • prepareForUseImpl

        protected void prepareForUseImpl​(TaskMonitor monitor,
                                         ObjectRepository repository)
        Description copied from class: AbstractOptionHandler
        This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.
        Specified by:
        prepareForUseImpl in class AbstractOptionHandler
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int indent)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Specified by:
        getDescription in interface MOAObject
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent
      • predictRating

        public double predictRating​(Integer user,
                                    Integer item)