throw new UnsupportedClassTypeException(" Only nominal class, please.");
if(instances.numClasses() != 2)
throw new Exception(" Only 2 classes, please.");
Instances data = new Instances(instances);
if(Utils.eq(data.sumOfWeights(),0))
throw new Exception(" No training data.");
data.deleteWithMissingClass();
if(Utils.eq(data.sumOfWeights(),0))
throw new Exception(" The class labels of all the training data are missing.");