newVals[attSoFar + k] = instance.value(j);
vals[attSoFar + k] = instance.value(j);
  private void convertInstanceNominal(Instance instance) throws Exception {      int attSoFar = 0;    double [] newVals = new double [outputFormatPeek().numAttributes()];    for(int j = 0; j < getInputFormat().numAttributes(); j++) {      Attribute att = getInputFormat().attribute(j);      if ((!att.isNominal()) || (j == getInputFormat().classIndex())) {	newVals[attSoFar] = instance.value(j);	attSoFar++;      } else {	if (att.numValues() <= 2) {	  newVals[attSoFar] = instance.value(j);	  attSoFar++;	} else {	  if (instance.isMissing(j)) {	    for (int k = 0; k < att.numValues(); k++) {              newVals[attSoFar + k] = instance.value(j);	    }	  } else {	    for (int k = 0; k < att.numValues(); k++) {	      if (k == (int)instance.value(j)) {                newVals[attSoFar + k] = 1;	      } else {                newVals[attSoFar + k] = 0;	      }	    }	  }	  attSoFar += att.numValues();	}      }    }        if (instance instanceof SparseInstance) {      push(new SparseInstance(instance.weight(), newVals));    } else {      push(new Instance(instance.weight(), newVals));    }  }