m_replaceMissing.setInputFormat(data); data = weka.filters.Filter.useFilter(data, m_replaceMissing);
Instances instances = new Instances(data); instances.setClassIndex(-1); m_replaceMissing.setInputFormat(instances); data = weka.filters.Filter.useFilter(instances, m_replaceMissing); instances = null;
  public void buildClusterer (Instances data)    throws Exception {    if (data.checkForStringAttributes()) {      throw  new Exception("Can't handle string attributes!");    }        m_replaceMissing = new ReplaceMissingValues();    m_replaceMissing.setInputFormat(data);    data = weka.filters.Filter.useFilter(data, m_replaceMissing);        m_theInstances = data;    // calculate min and max values for attributes    m_minValues = new double [m_theInstances.numAttributes()];    m_maxValues = new double [m_theInstances.numAttributes()];    for (int i = 0; i < m_theInstances.numAttributes(); i++) {      m_minValues[i] = m_maxValues[i] = Double.NaN;    }    for (int i = 0; i < m_theInstances.numInstances(); i++) {      updateMinMax(m_theInstances.instance(i));    }    doEM();        // save memory    m_theInstances = new Instances(m_theInstances,0);  }