newVals[j] = inst.value(j);
vals[j] = instance.value(j);
  private void convertInstance(Instance inst) throws Exception {      if (!(inst instanceof SparseInstance)) {      double[] newVals = new double[outputFormatPeek().numAttributes()];      for (int j = 0; j < getInputFormat().numAttributes(); j++) {	Attribute att = getInputFormat().attribute(j);	if ((!att.isNumeric()) || (j == getInputFormat().classIndex())) {	  newVals[j] = inst.value(j);	} else {	  if (inst.isMissing(j) || (inst.value(j) == 0)) {	    newVals[j] = inst.value(j);	  } else {	    newVals[j] = 1;	  }	}       }      push(new Instance(inst.weight(), newVals));    } else {      double[] newVals = new double[inst.numValues()];      int[] newIndices = new int[inst.numValues()];      for (int j = 0; j < inst.numValues(); j++) {	Attribute att = getInputFormat().attribute(inst.index(j));	if ((!att.isNumeric()) || (inst.index(j) == getInputFormat().classIndex())) {	  newVals[j] = inst.valueSparse(j);	} else {	  if (inst.isMissingSparse(j)) {	    newVals[j] = inst.valueSparse(j);	  } else {	    newVals[j] = 1;	  }	} 	newIndices[j] = inst.index(j);      }      push(new SparseInstance(inst.weight(), newVals, newIndices, 			      outputFormatPeek().numAttributes()));    }  }