BinaryClassificationMetrics extends AbstractMetrics<BinaryClassificationMetricValues> { public BinaryClassificationMetrics withPositiveClsLb(double positiveClsLb) { if (Double.isFinite(positiveClsLb)) this.positiveClsLb = positiveClsLb; return this; }  @Override BinaryClassificationMetricValues scoreAll(Iterator<LabelPair<Double>> iter); double positiveClsLb(); BinaryClassificationMetrics withPositiveClsLb(double positiveClsLb); double negativeClsLb(); BinaryClassificationMetrics withNegativeClsLb(double negativeClsLb); BinaryClassificationMetrics withEnablingROCAUC(boolean enableROCAUC); boolean isROCAUCenabled(); @Override String name();  }
@Test(expected = UnknownClassLabelException.class) public void testFailWithIncorrectClassLabelsInMetrics() { Metric scoreCalculator = new BinaryClassificationMetrics() .withPositiveClsLb(42); LabelPairCursor<Double> cursor = new TestLabelPairCursor<>( Arrays.asList(1.0, 1.0, 1.0, 1.0), Arrays.asList(1.0, 1.0, 0.0, 1.0) ); scoreCalculator.score(cursor.iterator()); }