data = new Instances(data);
  public void buildClassifier(Instances data) throws Exception {    /* check the data */    if (data.checkForStringAttributes()) {      throw new UnsupportedAttributeTypeException("Cannot handle string attributes!");    }    if (!data.attribute(data.classIndex()).isNominal()) {      throw new UnsupportedAttributeTypeException("Class type must be nominal!");    }	    /* initialize the classifier */    m_Train = new Instances(data, 0);    m_Exemplars = null;    m_ExemplarsByClass = new Exemplar[m_Train.numClasses()];    for(int i = 0; i < m_Train.numClasses(); i++){      m_ExemplarsByClass[i] = null;    }    m_MaxArray = new double[m_Train.numAttributes()];    m_MinArray = new double[m_Train.numAttributes()];    for(int i = 0; i < m_Train.numAttributes(); i++){      m_MinArray[i] = Double.POSITIVE_INFINITY;      m_MaxArray[i] = Double.NEGATIVE_INFINITY;    }    m_MI_MinArray = new double [data.numAttributes()];    m_MI_MaxArray = new double [data.numAttributes()];    m_MI_NumAttrClassInter = new int[data.numAttributes()][][];    m_MI_NumAttrInter = new int[data.numAttributes()][];    m_MI_NumAttrClassValue = new int[data.numAttributes()][][];    m_MI_NumAttrValue = new int[data.numAttributes()][];    m_MI_NumClass = new int[data.numClasses()];    m_MI = new double[data.numAttributes()];    m_MI_NumInst = 0;    for(int cclass = 0; cclass < data.numClasses(); cclass++)      m_MI_NumClass[cclass] = 0;    for (int attrIndex = 0; attrIndex < data.numAttributes(); attrIndex++) {	          if(attrIndex == data.classIndex())	continue;	          m_MI_MaxArray[attrIndex] = m_MI_MinArray[attrIndex] = Double.NaN;      m_MI[attrIndex] = Double.NaN;	          if(data.attribute(attrIndex).isNumeric()){	m_MI_NumAttrInter[attrIndex] = new int[m_NumFoldersMI];	for(int inter = 0; inter < m_NumFoldersMI; inter++){	  m_MI_NumAttrInter[attrIndex][inter] = 0;	}      } else {	m_MI_NumAttrValue[attrIndex] = new int[data.attribute(attrIndex).numValues() + 1];	for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){	  m_MI_NumAttrValue[attrIndex][attrValue] = 0;	}      }	          m_MI_NumAttrClassInter[attrIndex] = new int[data.numClasses()][];      m_MI_NumAttrClassValue[attrIndex] = new int[data.numClasses()][];      for(int cclass = 0; cclass < data.numClasses(); cclass++){	if(data.attribute(attrIndex).isNumeric()){	  m_MI_NumAttrClassInter[attrIndex][cclass] = new int[m_NumFoldersMI];	  for(int inter = 0; inter < m_NumFoldersMI; inter++){	    m_MI_NumAttrClassInter[attrIndex][cclass][inter] = 0;	  }	} else if(data.attribute(attrIndex).isNominal()){	  m_MI_NumAttrClassValue[attrIndex][cclass] = new int[data.attribute(attrIndex).numValues() + 1];			  for(int attrValue = 0; attrValue < data.attribute(attrIndex).numValues() + 1; attrValue++){	    m_MI_NumAttrClassValue[attrIndex][cclass][attrValue] = 0;	  }	}      }    }    m_MissingVector = new double[data.numAttributes()];    for(int i = 0; i < data.numAttributes(); i++){      if(i == data.classIndex()){	m_MissingVector[i] = Double.NaN;      } else {	m_MissingVector[i] = data.attribute(i).numValues();      }    }    /* update the classifier with data */    Enumeration enum = data.enumerateInstances();    while(enum.hasMoreElements()){      update((Instance) enum.nextElement());    }	