Package weka.classifiers.meta

Examples of weka.classifiers.meta.FilteredClassifier.classifyInstance()


        fc.setClassifier(j48);
        // train using stock_training_data.arff:
        fc.buildClassifier(training_data);
        // test using stock_testing_data.arff:
        for (int i = 0; i < testing_data.numInstances(); i++) {
          double pred = fc.classifyInstance(testing_data.instance(i));
          System.out.print("given value: " + testing_data.classAttribute().value((int)testing_data.instance(i).classValue()));
          System.out.println(". predicted value: " + testing_data.classAttribute().value((int) pred));
        }

  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.