public void F1ScoreMetric_Not_Different_Lengths() { var targets = new double[] { 0, 1, 1, 1 }; var predictions = new double[] { 0, 1, 1, 1, 0 }; var sut = new F1ScoreMetric <double>(1); var actual = sut.Error(targets, predictions); }
public void F1ScoreMetric_Not_Binary() { var targets = new double[] { 0, 1, 1, 2 }; var predictions = new double[] { 0, 1, 1, 2 }; var sut = new F1ScoreMetric <double>(1); var actual = sut.Error(targets, predictions); }
public void F1ScoreMetric_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 F1ScoreMetric <double>(1); var actual = sut.Error(targets, predictions); Assert.AreEqual(0.77777777777777779, actual); }
public void F1ScoreMetric_All_Error() { var targets = new double[] { 0, 1, 0 }; var predictions = new double[] { 1, 0, 1 }; var sut = new F1ScoreMetric <double>(1); var actual = sut.Error(targets, predictions); Assert.AreEqual(1.0, actual); }