int current = m_SelectedAttributes[i];
vals[i] = instance.value(current);
}
Instance inst = null;
if (instance instanceof SparseInstance)
inst = new SparseInstance(instance.weight(), vals);
else
inst = new DenseInstance(instance.weight(), vals);
inst.setDataset(getOutputFormat());
copyValues(inst, false, instance.dataset(), getOutputFormat());