}
int totalFeatures = sumValues[numFeatures - 1] + numValues[numFeatures - 1] + 1;
System.err.println("total feats " + totalFeatures);
LogConditionalObjectiveFunction<L, F> objective = new LogConditionalObjectiveFunction<L, F>(totalFeatures, numClasses, newdata, labels, prior, sigma, 0.0);
Minimizer<DiffFunction> min = new QNMinimizer();
double[] argmin = min.minimize(objective, 1e-4, objective.initial());
double[][] wts = objective.to2D(argmin);
System.out.println("weights have dimension " + wts.length);
return new NBWeights(wts, numValues);
}