public void testIRStats()
 {
     IRStatistics stats = new IRStatisticsImpl(0.3, 0.1, 0.2, 0.05, 0.15);
     Assert.AreEqual(0.3, stats.GetPrecision(), EPSILON);
     Assert.AreEqual(0.1, stats.GetRecall(), EPSILON);
     Assert.AreEqual(0.15, stats.GetF1Measure(), EPSILON);
     Assert.AreEqual(0.11538461538462, stats.GetFNMeasure(2.0), EPSILON);
     Assert.AreEqual(0.05, stats.GetNormalizedDiscountedCumulativeGain(), EPSILON);
 }
Esempio n. 2
0
        public void testIRStats()
        {
            IRStatistics stats = new IRStatisticsImpl(0.3, 0.1, 0.2, 0.05, 0.15);

            Assert.AreEqual(0.3, stats.GetPrecision(), EPSILON);
            Assert.AreEqual(0.1, stats.GetRecall(), EPSILON);
            Assert.AreEqual(0.15, stats.GetF1Measure(), EPSILON);
            Assert.AreEqual(0.11538461538462, stats.GetFNMeasure(2.0), EPSILON);
            Assert.AreEqual(0.05, stats.GetNormalizedDiscountedCumulativeGain(), EPSILON);
        }