How to print out the predicted class after cross-validation in WEKA
问题 Once a 10-fold cross-validation is done with a classifier, how can I print out the prediced class of every instance and the distribution of these instances? J48 j48 = new J48(); Evaluation eval = new Evaluation(newData); eval.crossValidateModel(j48, newData, 10, new Random(1)); When I tried something similar to below, it said that the classifier is not built . for (int i=0; i<data.numInstances(); i++){ System.out.println(j48.distributionForInstance(newData.instance(i))); } What I'm trying to