public class F1 extends QualityMeasure
F1 = 2 * precision * recall / (precision + recall)
recommender
Constructor and Description |
---|
F1(Recommender recommender,
int numberOfRecommendations,
double relevantThreshold)
Constructor
|
F1(Recommender recommender,
Map<String,Object> params)
Constructor from a Map object with the quality measure parameters.
|
Modifier and Type | Method and Description |
---|---|
protected 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 F1(Recommender recommender, Map<String,Object> params)
recommender
- Recommender instance for which the F1 are going to be computedparams
- Quality measure's parameterspublic F1(Recommender recommender, int numberOfRecommendations, double relevantThreshold)
recommender
- Recommender instance for which the F1 are going to be computednumberOfRecommendations
- Number of recommendationsrelevantThreshold
- Minimum rating to consider a rating as relevantprotected 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.