float[][] values = new float[polyCoeffs.length][];
for (int i = 0; i < values.length; i++) {
Function component = new Polynomial(polyCoeffs[i]);
values[i] = new float[evalPoints.length];
for (int j = 0; j < evalPoints.length; j++) {
values[i][j] = component.map(new float[]{evalPoints[j]});
}
}
LinearApproximator approximator = new IndependentDimensionApproximator(evalPoints, values, new int[]{0,1,0}, 2, new ConstantFunction(1,1f), 0f);
float[] coefficients = approximator.findCoefficients(target);