Search in sources :

Example 1 with PerformanceExtractor

use of ml.shifu.shifu.core.eval.PerformanceExtractor in project shifu by ShifuML.

the class AreaUnderCurveTest method calculateAreaTest.

@Test
public void calculateAreaTest() {
    PerformanceExtractor xExtractor = Performances.fpr();
    PerformanceExtractor yExtractor = Performances.recall();
    List<PerformanceObject> nullList = null;
    List<PerformanceObject> oneList = Arrays.asList(new PerformanceObject());
    Assert.assertEquals(AreaUnderCurve.calculateArea(nullList, xExtractor, yExtractor), 0.0);
    Assert.assertEquals(AreaUnderCurve.calculateArea(oneList, xExtractor, yExtractor), 0.0);
}
Also used : PerformanceObject(ml.shifu.shifu.container.PerformanceObject) PerformanceExtractor(ml.shifu.shifu.core.eval.PerformanceExtractor) Test(org.testng.annotations.Test)

Aggregations

PerformanceObject (ml.shifu.shifu.container.PerformanceObject)1 PerformanceExtractor (ml.shifu.shifu.core.eval.PerformanceExtractor)1 Test (org.testng.annotations.Test)1