public void TestEvaluate() { DataModel model = GetDataModel(); RecommenderBuilder builder = new SlopeOneRecommenderBuilder(); RecommenderEvaluator evaluator = new RMSRecommenderEvaluator(); double eval = evaluator.Evaluate(builder, model, 0.75, 1.0); Assert.AreEqual(0.26387685767414826, eval, EPSILON); }
public void TestEvaluate() { DataModel model = GetDataModel(); RecommenderBuilder builder = new SlopeOneRecommenderBuilder(); RecommenderIRStatsEvaluator evaluator = new GenericRecommenderIRStatsEvaluator(); IRStatistics stats = evaluator.Evaluate(builder, model, 5, 0.2, 1.0); Assert.IsNotNull(stats); Assert.AreEqual(0.2, stats.Precision, EPSILON); Assert.AreEqual(1.0, stats.Recall, EPSILON); Assert.AreEqual(0.33333, stats.GetF1Measure(), EPSILON); }