Open eltoder opened 1 month ago
I guess it can also be done the other way around: remove these values from EndCriteria
or maybe even remove EndCriteria
altogether. Put all "maximum iterations" and "tolerances" arguments on the optimization methods. This has two advantages:
EndCriteria
.Hmm, you're right, it is confusing. The problem is, EndCriteria
is a bother to instantiate with just the parameters for a given optimizer (at least until we can use designated initializers) but is in the signature of the parent Optimizer
class so it can't be removed from just Levenberg-Marquardt, and it's difficult to deprecate correctly. On the other hand, removing xtol
and gtol
would leave us with half the parameters in EndCriteria
and the other half in the constructor. I'm not sure what steps to take here.
LevenbergMarquardt
currently acceptsxtol
andgtol
arguments in the constructor. These are passed as the respective arguments into theMINPACK::lmdif()
call. These appear to be duplicates ofrootEpsilon
andgradientNormEpsilon
values already present on theEndCriteria
argument. Consequently, the values from theEndCriteria
are ignored. They still have to be passed to theEndCriteria
constructor though, since there are no defaults. This seems a bit confusing. Should thextol
andgtol
arguments be removed and theEndCriteria
values used instead?