Instances toFilter = getInputFormat();
Instances[] toFilterIgnoringAttributes;
// Make subsets if class is nominal
if ((toFilter.classIndex() >= 0) && toFilter.classAttribute().isNominal()) {
toFilterIgnoringAttributes = new Instances[toFilter.numClasses()];
for (int i = 0; i < toFilter.numClasses(); i++) {
toFilterIgnoringAttributes[i] = new Instances(toFilter, toFilter.numInstances());
}
for (int i = 0; i < toFilter.numInstances(); i++) {
toFilterIgnoringAttributes[(int)toFilter.instance(i).classValue()].add(toFilter.instance(i));