dataPoints[1][i]);
weights[i] = 1 / dataPoints[1][i];
}
final Optimum optimum = optimizer.optimize(
builder(problem)
.target(dataPoints[1])
.weight(new DiagonalMatrix(weights))
.start(start)
.maxIterations(20)
.build()
);
final RealVector solution = optimum.getPoint();
final double[] expectedSolution = { 10.4, 958.3, 131.4, 33.9, 205.0 };
final RealMatrix covarMatrix = optimum.getCovariances(1e-14);
final double[][] expectedCovarMatrix = {
{ 3.38, -3.69, 27.98, -2.34, -49.24 },
{ -3.69, 2492.26, 81.89, -69.21, -8.9 },
{ 27.98, 81.89, 468.99, -44.22, -615.44 },
{ -2.34, -69.21, -44.22, 6.39, 53.80 },