m_Discretizer.setAttributeIndices("" + (instances.classIndex() + 1));
m_Discretizer.setBins(getNumBins());
m_Discretizer.setInputFormat(instances);
Instances newTrain = Filter.useFilter(instances, m_Discretizer);
int numClasses = newTrain.numClasses();
// Calculate the mean value for each bin of the new class attribute
m_ClassMeans = new double [numClasses];
int [] classCounts = new int [numClasses];
for (int i = 0; i < instances.numInstances(); i++) {