List of usage examples for weka.classifiers Evaluation toClassDetailsString
public String toClassDetailsString(String title) throws Exception
From source file:tucil.dua.ai.TucilDuaAi.java
public static void fullTrainingSet() throws Exception { Classifier j48 = new J48(); j48.buildClassifier(datas);/* w w w .j a v a2 s .com*/ Evaluation eval = new Evaluation(datas); eval.evaluateModel(j48, datas); System.out.println("=====Run Information======"); System.out.println("======Classifier Model======"); System.out.println(j48.toString()); System.out.println(eval.toSummaryString("====Stats======\n", false)); System.out.println(eval.toClassDetailsString("====Detailed Result=====\n")); System.out.println(eval.toMatrixString("======Confusion Matrix======\n")); }
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);//from ww w . j a v a 2 s . c o 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")); }