} else { if (m_classIsNominal)
} else { if (m_classIsNominal) {
  double classifyFoldCV(Instances fold, int [] fs) throws Exception  {    int i;    int ruleCount = 0;    int numFold = fold.numInstances();    int numCl = m_theInstances.classAttribute().numValues();    double [][] class_distribs = new double [numFold][numCl];    double [] instA = new double [fs.length];    double [] normDist;    hashKey thekey;    double acc = 0.0;    int classI = m_theInstances.classIndex();    Instance inst;    if (m_classIsNominal)      normDist = new double [numCl];    else      normDist = new double [2];    // first *remove* instances    for (i=0;i<numFold;i++)    {      inst = fold.instance(i);      for (int j=0;j<fs.length;j++)	if (fs[j] == classI)	  instA[j] = Double.MAX_VALUE; // missing for the class	else if (inst.isMissing(fs[j]))	  instA[j] = Double.MAX_VALUE;	else	  instA[j] = inst.value(fs[j]);      thekey = new hashKey(instA);      if ((class_distribs[i] = (double [])m_entries.get(thekey)) == null)      {	System.out.println("Shouldnt get here!");	System.exit(1);      }      else      {	if (m_classIsNominal)	  class_distribs[i][(int)inst.classValue()] -= inst.weight();	else	{	  class_distribs[i][0] -= (inst.classValue() * inst.weight());	  class_distribs[i][1] -= inst.weight();	}	ruleCount++;      }    }    // now classify instances    for (i=0;i<numFold;i++)    {      inst = fold.instance(i);      System.arraycopy(class_distribs[i],0,normDist,0,normDist.length);      if (m_classIsNominal)      {	boolean ok = false;	for (int j=0;j<normDist.length;j++)	  if (!Utils.eq(normDist[j],0.0))	  {	    ok = true;	    break;	  }		if (ok)	{	  Utils.normalize(normDist);	  if (Utils.maxIndex(normDist) == inst.classValue())	    acc += inst.weight();	}	else	  if (inst.classValue() == m_majority)	    acc += inst.weight();      }      else      {	if (Utils.eq(normDist[1],0.0))	    acc += ((inst.weight() * (m_majority - inst.classValue())) * 		    (inst.weight() * (m_majority - inst.classValue())));	else	{	  double t = (normDist[0] / normDist[1]);	  acc += ((inst.weight() * (t - inst.classValue())) * 		  (inst.weight() * (t - inst.classValue())));	}      }    }    // now re-insert instances    for (i=0;i<numFold;i++)    {      inst = fold.instance(i);      if (m_classIsNominal)      {	class_distribs[i][(int)inst.classValue()] += inst.weight();      }      else      {	class_distribs[i][0] += (inst.classValue() * inst.weight());	class_distribs[i][1] += inst.weight();      }    }    return acc;  }