Better initial guess for the circle centre

This commit is contained in:
aherbert 2022-10-13 15:41:33 +01:00
parent a80eefc21a
commit 4e2457cb36
1 changed files with 2 additions and 2 deletions

View File

@ -257,7 +257,7 @@ public class LevenbergMarquardtOptimizerTest
factory.samples(numPoints).forEach(circle::addPoint);
// First guess for the center's coordinates and radius.
final double[] init = { 90, 659, 115 };
final double[] init = { 118, 659, 115 };
final Optimum optimum = optimizer.optimize(
builder(circle).maxIterations(50).start(init).build());
@ -290,7 +290,7 @@ public class LevenbergMarquardtOptimizerTest
factory.samples(numPoints).forEach(circle::addPoint);
// First guess for the center's coordinates and radius.
final double[] init = { 90, 659, 115 };
final double[] init = { 118, 659, 115 };
final Optimum optimum
= optimizer.optimize(builder(circle).maxIterations(50).start(init).build());
final int numEval = optimum.getEvaluations();