[math] Levenerg-Marquardt evaluations vs. iterations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[math] Levenerg-Marquardt evaluations vs. iterations

Kearns, Aaron
Hi,

I have been using the LM solver in a least-squares curve fitting function. I have been using some debugging statements every time the function (& Jacobian) is evaluated. I would like some clarification on what the number of evalutations vs. iterations is. My understanding is that the number of evaluations is the number of times the MultivariateJacobianFunction used in the least-squares problem definition is run, whereas the number of iterations is the number of times a change in the input variables leads to an improvement in the cost function / residual. Is this a correct interpretation? Would we be able to get the number of iterations based on just looking at the change in the cost function per evaluation of the MJF at different points and subtracting the times that a change in variables produced a worse cost?

Thanks, 

Aaron Kearns 

KBRwyle  |  Software Engineer
Target Road 10002 Isleta SE  |  Kirtland AFB, NM 87117  |  USA
Office: +1 505.853.2582  |  Mobile: +1 304.997.0148  |  [hidden email]  |  [hidden email][hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: [math] Levenerg-Marquardt evaluations vs. iterations

Gilles Sadowski
Hi.

On Wed, 18 Oct 2017 15:00:20 -0600, Kearns, Aaron wrote:

> Hi,
>
> I have been using the LM solver in a least-squares curve fitting
> function.
> I have been using some debugging statements every time the function
> (&
> Jacobian) is evaluated. I would like some clarification on what the
> number
> of evalutations vs. iterations is. My understanding is that the
> number of
> evaluations is the number of times the MultivariateJacobianFunction
> used in
> the least-squares problem definition is run,

Indeed.

> whereas the number of
> iterations is the number of times a change in the input variables
> leads to
> an improvement in the cost function / residual.

The number of iterations is incremented by one for each pass
through the algorithm's in main loop:
   
http://commons.apache.org/proper/commons-math/apidocs/src-html/org/apache/commons/math4/fitting/leastsquares/LevenbergMarquardtOptimizer.html#line.337

> Is this a correct
> interpretation?

Probably (bugs notwithstanding).

> Would we be able to get the number of iterations based on
> just looking at the change in the cost function per evaluation of the
> MJF
> at different points and subtracting the times that a change in
> variables
> produced a worse cost?

Calling "getIterations()" would be more straightforward:
   
http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/fitting/leastsquares/LeastSquaresOptimizer.Optimum.html


HTH,
Gilles



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]