double minBestLaplace = leafLaplace;
double minBestVal = Double.NaN;
double minBestPos = Double.NaN;
double minBestTotal = Double.NaN;
double [][] minBestCounts = null;
double [][] counts = new double[2][n.numClasses()];
for(int x = 0; x < n.numInstances(); x++) {
if(n.instance(sorted[x]).isMissing(a))
break; // missing are sorted to end: no more valid vals
double theval = n.instance(sorted[x]).value(a);