For Weka Explorer (GUI), when we do a 10-fold CV for any given ARFF file, then what Weka Explorer provides (as far as I can see) is the average result for all the 10 folds.
Q. Is there any way to get the results of each fold? For instance, I need the error rates (incorrectly identified instances) for each fold.
Help appreciated.
Weka Explorer does not have an option to give the results for individual folds when using the crossvalidation option, there are some workarounds. If you explicitly don't want to change any code, you need to do some manual fiddling, but I think this gives more or less what you want
Cross-validation
, selectPercentage split
and set it to 90%More options...
and change theRandom seed for XVal / % Split
value to something you haven't used before.This is not exactly equivalent to 10-fold crossvalidation though, since the pseudo-folds you make this way might overlap.
An alternative that is equivalent to crossvalidation, but more cumbersome, would be to make 10 folds manually by using the unsupervised instance filter
RemoveFolds
orRemoveRange
. Generate and save 10 training sets and 10 test sets. Then for every fold, load the training set, selectSupplied test set
in the classify tab, and select the appropriate test fold.I think this is possible using Weka's GUI. You need to use the Experimenter though instead of the Explorer. Here are the steps:
Experimenter
from the GUI ChooserNew
button @ top-right)Results Destination
to save the results toNumber of (cross-validation) folds
to your liking (start experimenting with 2 folds for easy results)Number of repetitions
(I recommend 1 to start of with)Run
tab andStart
the experiment and wait till it finishesAnalyse
tab and import the experiment results by clickingExperiment
(top-right)Row
select:Fold
Column
select:Percent_incorrect
orNumber_incorrect
(or any other measure you want to see)