Writing the results of Weka classifier to file in Java
问题 I am generating decision trees in Weka in Java code as follows: J48 j48DecisionTree = new J48(); Instances data = null; data = new Instances(new BufferedReader(new FileReader(dt.getArffFile()))); data.setClassIndex(data.numAttributes() - 1); j48DecisionTree.buildClassifier(data); Can I save the results of the Weka results buffer to a text file in the program, such that the following can be saved at run-time to a text file: === Stratified cross-validation === === Summary === Correctly