Class MSE

  • Direct Known Subclasses:
    RMSE

    public class MSE
    extends QualityMeasure
    This class calculates the Mean Squared Error (MSE) between the predictions and the test ratings.

    MSE = ∑(<test item rating prediction> - <test item rating>)2 / <number of predictions>

    • Constructor Detail

      • MSE

        public MSE​(Recommender recommender)
        Constructor of the class which basically calls the father's one
        Parameters:
        recommender - Recommender instance for which the MSE are going to be computed
    • Method Detail

      • getScore

        public double getScore​(TestUser testUser,
                               double[] predictions)
        Description copied from class: QualityMeasure
        Computes the quality measure score for a TestUser given the predictions for his/her test ratings
        Specified by:
        getScore in class QualityMeasure
        Parameters:
        testUser - TestUser for which the quality measure score is computed
        predictions - Prediction value for the test items rated by the test user
        Returns:
        Quality measure score