use of weka.classifiers.functions.SMO in project dkpro-tc by dkpro.
the class WekaResultsTest method testWekaResultsSingleLabel.
@Test
public void testWekaResultsSingleLabel() throws Exception {
SMO cl = new SMO();
Instances testData = WekaUtils.makeOutcomeClassesCompatible(singleLabelTrainData, singleLabelTestData, false);
Instances trainData = WekaUtils.removeInstanceId(singleLabelTrainData, false);
testData = WekaUtils.removeInstanceId(testData, false);
cl.buildClassifier(trainData);
Evaluation eval = WekaUtils.getEvaluationSinglelabel(cl, trainData, testData);
assertEquals(7.0, eval.correct(), 0.01);
}
Aggregations