Reputation: 442
When I perform a n-fold cross validation on m classes, in each fold, are the train and test sets balanced? By balanced, I mean to ask if there are (nearly) the same set of samples from each class in train and test sets.
Upvotes: 0
Views: 2121
Reputation: 61114
If I understand this part correctly:
I mean to ask if there are (nearly) the same set of samples from each class in train and test sets.
... I think you are referring to stratified cross validation: where the class proportions for each fold is the same as the class proportions of the entire data set.
Yes, it is certainly possible in Weka, but you may want to consult the documentation. Might these help?
http://weka.wikispaces.com/Primer
http://weka.wikispaces.com/Generating+cross-validation+folds+(Java+approach)
http://weka.sourceforge.net/doc/weka/filters/supervised/instance/StratifiedRemoveFolds.html
Upvotes: 5