if (!m_kNNValid && (m_CrossValidate) && (m_kNN > 1)) {
if (!m_kNNValid && (m_CrossValidate) && (m_kNNUpper >= 1)) {
  public double [] distributionForInstance(Instance instance)   throws Exception {    if (m_Train.numInstances() == 0) {      throw new Exception("No training instances!");    }    // cut instances to windowsize    if ((m_WindowSize > 0) && (m_Train.numInstances() > m_WindowSize)) {      m_kNNValid = false;      while (m_Train.numInstances() > m_WindowSize) {	m_Train.delete(0);        m_KDTree.setValid(false);      }    }        if ((m_KDTree != null) && (!m_KDTree.isValid())) {      m_KDTree.buildKDTree(m_Train);      //OOPS("KDTree build in distributionForInstance");      //OOPS(" " + m_KDTree.toString());          }    // Select k by cross validation    if (!m_kNNValid && (m_CrossValidate) && (m_kNN > 1)) {      crossValidate();    }    // update ranges - for norm()-method     if (!m_DontNormalize) {      m_Ranges = Instances.updateRanges(instance, m_Ranges);    }    // update ranges for norm()-methode in Distance class of KDTree    if (m_KDTree != null) {      m_KDTree.addLooslyInstance(instance);    }    // find neighbours and make distribution    NeighbourList neighbourlist = findNeighbours(instance);    return makeDistribution(neighbourlist);  }