@Override
public Recommender buildRecommender(DataModel dataModel) throws TasteException {
return new SlopeOneRecommender(dataModel);
}
};
RecommenderIRStatsEvaluator evaluator = new GenericRecommenderIRStatsEvaluator();
IRStatistics stats = evaluator.evaluate(builder, null, model, null, 1, 0.2, 1.0);
assertNotNull(stats);
assertEquals(0.75, stats.getPrecision(), EPSILON);
assertEquals(0.75, stats.getRecall(), EPSILON);
assertEquals(0.75, stats.getF1Measure(), EPSILON);
assertEquals(0.75, stats.getNormalizedDiscountedCumulativeGain(), EPSILON);