*/
public void removeStratifiedFoldsFilter(Integer fold, Integer numFolds, boolean invert) throws Exception {
if (_logger.isDebugEnabled()) {
_logger.debug("Applying stratified remove folds filter");
}
StratifiedRemoveFolds srf = new StratifiedRemoveFolds();
String[] options;
if (invert) {
options = new String[6];
options[0] = "-S";
options[1] = "-9";
options[2] = "-N";
options[3] = numFolds.toString();
options[4] = "-F";
options[5] = fold.toString();
} else {
options = new String[7];
options[0] = "-S";
options[1] = "-9";
options[2] = "-V";
options[3] = "-N";
options[4] = numFolds.toString();
options[5] = "-F";
options[6] = fold.toString();
}
srf.setOptions(options);
srf.setInputFormat(_instances);
_instances = Filter.useFilter(_instances, srf);
}