this.problem = new LeastSquaresProblem();
}
class LeastSquaresProblem {
public ModelFunction getModelFunction() {
return new ModelFunction(new MultivariateVectorFunction() {
public double[] value(final double[] a) {
final int n = getNumObservations();
final double[] yhat = new double[n];
for (int i = 0; i < n; i++) {
yhat[i] = getModelValue(getX(i), a);