List of usage examples for weka.classifiers.trees J48 toSummaryString
@Override
public String toSummaryString()
From source file:classif.ExperimentsLauncher.java
License:Open Source License
public void launchJ48() { try {/*ww w. j a v a2s . co m*/ String algo = "J48"; System.out.println(algo); double testError = 0.0; J48 dt = new J48(); dt.buildClassifier(train); Evaluation eval = new Evaluation(train); eval.evaluateModel(dt, test); testError = eval.errorRate(); System.out.println("TestError:" + testError + "\n"); System.out.println(dt.toSummaryString()); System.out.println(dt.graph()); System.out.println(eval.toSummaryString()); } catch (Exception e) { e.printStackTrace(); } }