use of meka.classifiers.multilabel.BR in project dkpro-tc by dkpro.
the class WekaResultsTest method testWekaResultsMultiLabel.
@Test
public void testWekaResultsMultiLabel() throws Exception {
BR cl = new BR();
cl.setOptions(new String[] { "-W", J48.class.getName() });
Instances testData = WekaUtils.makeOutcomeClassesCompatible(multiLabelTrainData, multiLabelTestData, true);
Instances trainData = WekaUtils.removeInstanceId(multiLabelTrainData, true);
testData = WekaUtils.removeInstanceId(testData, true);
cl.buildClassifier(trainData);
Result eval = WekaUtils.getEvaluationMultilabel(cl, trainData, testData, "0.2");
assertEquals(16.0, eval.L, 0.01);
assertEquals(0.0, (Double) Result.getStats(eval, "1").get("Exact match"), 0.01);
}