Exemple #1
0
        public void RecallMetric_Not_Different_Lengths()
        {
            var targets     = new double[] { 0, 1, 1, 1 };
            var predictions = new double[] { 0, 1, 1, 1, 0 };

            var sut    = new RecallMetric <double>(1);
            var actual = sut.Error(targets, predictions);
        }
Exemple #2
0
        public void RecallMetric_Not_Binary()
        {
            var targets     = new double[] { 0, 1, 1, 2 };
            var predictions = new double[] { 0, 1, 1, 2 };

            var sut    = new RecallMetric <double>(1);
            var actual = sut.Error(targets, predictions);
        }
Exemple #3
0
        public void RecallMetric_Error_All_Positive()
        {
            var targets     = new double[] { 0, 0, 0, 0, 0, 0, 0, 1 };
            var predictions = new double[] { 1, 1, 1, 1, 1, 1, 1, 1 };

            var sut    = new RecallMetric <double>(1);
            var actual = sut.Error(targets, predictions);

            Assert.AreEqual(0.0, actual);
        }
Exemple #4
0
        public void RecallMetric_Error()
        {
            var targets     = new double[] { 0, 1, 1, 1, 1, 0, 0, 1 };
            var predictions = new double[] { 1, 1, 1, 0, 1, 0, 1, 1 };

            var sut    = new RecallMetric <double>(1);
            var actual = sut.Error(targets, predictions);

            Assert.AreEqual(0.19999999999999996, actual, 0.0001);
        }