Search in sources :

Example 1 with SMOreg

use of weka.classifiers.functions.SMOreg in project dkpro-tc by dkpro.

the class WekaResultsTest method testWekaResultsRegression.

@Test
public void testWekaResultsRegression() throws Exception {
    SMOreg cl = new SMOreg();
    Instances trainData = WekaUtils.removeInstanceId(regressionTrainData, false);
    Instances testData = WekaUtils.removeInstanceId(regressionTestData, false);
    cl.buildClassifier(trainData);
    Evaluation eval = WekaUtils.getEvaluationSinglelabel(cl, trainData, testData);
    assertEquals(0.45, eval.correlationCoefficient(), 0.01);
}
Also used : Instances(weka.core.Instances) Evaluation(weka.classifiers.Evaluation) SMOreg(weka.classifiers.functions.SMOreg) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Evaluation (weka.classifiers.Evaluation)1 SMOreg (weka.classifiers.functions.SMOreg)1 Instances (weka.core.Instances)1