Example usage for weka.classifiers Evaluation toSummaryString

List of usage examples for weka.classifiers Evaluation toSummaryString

Introduction

In this page you can find the example usage for weka.classifiers Evaluation toSummaryString.

Prototype

public String toSummaryString(String title, boolean printComplexityStatistics) 

Source Link

Document

Outputs the performance statistics in summary form.

Usage

From source file:tucil.dua.ai.TucilDuaAi.java

public static void crossValidation() throws Exception {
    Evaluation evaluation = new Evaluation(datas);
    Classifier attr_tree = new J48();
    attr_tree.buildClassifier(datas);/*  w  w w .java 2s  .  co m*/
    evaluation.crossValidateModel(attr_tree, datas, 10, new Random(1));
    System.out.println("=====Run Information======");
    System.out.println("======Classifier Model======");
    System.out.println(attr_tree.toString());
    System.out.println(evaluation.toSummaryString("====Stats======\n", false));
    System.out.println(evaluation.toClassDetailsString("====Detailed Result=====\n"));
    System.out.println(evaluation.toMatrixString("======Confusion Matrix======\n"));
}

From source file:tucil2ai.Tucil2AI.java

/**
 *
 * @param E/*from w  ww  .j  a  v  a  2s.  c o m*/
 * @throws Exception
 */
public static void printEval(Evaluation E) throws Exception {
    System.out.println(E.toSummaryString("\nResults\n======\n", false));
    System.out.println(E.toClassDetailsString());
    System.out.println(E.toMatrixString());
}