values[i]=predConf;
values[idx]=predConf;
  protected Instance metaInstance(Instance instance, int k) throws Exception {    double[] values = new double[m_MetaFormat.numAttributes()];    Instance metaInstance;    double predConf;    int i;    int maxIdx;    double maxVal;    for (i = 0;i<instance.numAttributes()-1;i++) {      values[i] = instance.value(i);    }    Classifier classifier = getClassifier(k);    if (m_BaseFormat.classAttribute().isNumeric()) {      throw new Exception("Class Attribute must not be numeric!");    } else {      double[] dist = classifier.distributionForInstance(instance);            maxIdx=0;      maxVal=dist[0];      for (int j = 1; j < dist.length; j++) {	if (dist[j]>maxVal) {	  maxVal=dist[j];	  maxIdx=j;	}      }      predConf= (instance.classValue()==maxIdx) ? 1:0;    }        values[i]=predConf;    metaInstance = new Instance(1, values);    metaInstance.setDataset(m_MetaFormat);    return metaInstance;  }