public class R2 extends QualityMeasure
MSE = (∑(<test item rating> - <test item rating prediction>)2 + (<test item rating> - <getTestRatingAverage>)2) / <number of predictions>
recommender
Constructor and Description |
---|
R2(Recommender recommender)
Constructor of the class which basically calls the father's one
|
Modifier and Type | Method and Description |
---|---|
double |
getScore(TestUser testUser,
double[] predictions)
Computes the quality measure score for a TestUser given the predictions for his/her test
ratings
|
getScore, getScore
public R2(Recommender recommender)
recommender
- Recommender instance for which the R2 are going to be computedpublic double getScore(TestUser testUser, double[] predictions)
QualityMeasure
getScore
in class QualityMeasure
testUser
- TestUser for which the quality measure score is computedpredictions
- Prediction value for the test items rated by the test userCopyright © 2020. All rights reserved.