Example usage for weka.filters.supervised.attribute AddClassification setRemoveOldClass

List of usage examples for weka.filters.supervised.attribute AddClassification setRemoveOldClass

Introduction

In this page you can find the example usage for weka.filters.supervised.attribute AddClassification setRemoveOldClass.

Prototype

public void setRemoveOldClass(boolean value) 

Source Link

Document

Set whether the old class attribute is removed.

Usage

From source file:elh.eus.absa.WekaWrapper.java

License:Open Source License

public Instances addClassification(Classifier cl, Instances data) throws Exception {
    //filter/*  w w w.  j a  v  a  2 s.c  o m*/
    AddClassification add = new AddClassification();
    add.setRemoveOldClass(true); //remove the old class attribute
    add.setOutputDistribution(true);
    add.setClassifier(cl);
    add.setInputFormat(data);

    // meta-classifier
    Instances rslt = Filter.useFilter(data, add);
    return rslt;
}