public void RocAucClassificationMetric_ErrorString()
        {
            var targets       = new double[] { 0, 1 };
            var probabilities = new ProbabilityPrediction[] { new ProbabilityPrediction(0, new Dictionary <double, double> {
                    { 0, 0 }, { 1.0, 0.0 }
                }), new ProbabilityPrediction(1, new Dictionary <double, double> {
                    { 0, 0.0 }, { 1.0, 1 }
                }) };
            var sut    = new RocAucClassificationProbabilityMetric(1);
            var actual = sut.ErrorString(targets, probabilities);

            var expected = ";0;1;0;1\r\n0;1.000;0.000;100.000;0.000\r\n1;0.000;1.000;0.000;100.000\r\nError: 0.000\r\n";

            Assert.AreEqual(expected, actual);
        }
        public void RocAucClassificationMetric_ErrorString_TargetStringMapping()
        {
            var targets       = new double[] { 0, 1 };
            var probabilities = new ProbabilityPrediction[] { new ProbabilityPrediction(0, new Dictionary <double, double> {
                    { 0, 0 }, { 1.0, 0.0 }
                }), new ProbabilityPrediction(1, new Dictionary <double, double> {
                    { 0, 0.0 }, { 1.0, 1 }
                }) };
            var sut = new RocAucClassificationProbabilityMetric(1);
            var targetStringMapping = new Dictionary <double, string> {
                { 0, "Negative" }, { 1, "Positive" }
            };

            var actual   = sut.ErrorString(targets, probabilities, targetStringMapping);
            var expected = ";Negative;Positive;Negative;Positive\r\nNegative;1.000;0.000;100.000;0.000\r\nPositive;0.000;1.000;0.000;100.000\r\nError: 0.000\r\n";

            Assert.AreEqual(expected, actual);
        }