sums[i] = sumOfWeights;
}
double[] results = new double[getInputFormat().numAttributes()];
for (int j = 0; j < getInputFormat().numInstances(); j++) {
Instance inst = getInputFormat().instance(j);
for (int i = 0; i < inst.numValues(); i++) {
if (!inst.isMissingSparse(i)) {
double value = inst.valueSparse(i);
if (inst.attributeSparse(i).isNominal()) {
counts[inst.index(i)][(int)value] += inst.weight();
counts[inst.index(i)][0] -= inst.weight();