In the function fit, what exactly is the difference between the 2 parameters MaxFunEvals & MaxIter?

10 Ansichten (letzte 30 Tage)
In the function fit(Curve Fitting Toolbox), what exactly is the difference between the 2 parameters MaxFunEvals & MaxIter?
  1 Kommentar
dpb
dpb am 5 Aug. 2019
In nonlinear fitting there's more than one function evaluation per solution iteration -- the number of "outer" iterations is MaxIter while the number of total function evaluations is MaxFunEvals There's no specific relationship between the two; if one has a very expensive functional, one can limit total time by not allowing more than some N evaluations. Of course, limiting either risks terminating before convergence even if there may be a final solution.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Steven Lord
Steven Lord am 5 Aug. 2019
If you had to walk through an unfamiliar darkened room and you had a stick, you might tap the ground in front of you, in front and to the left, and in front and to the right to determine where the path is clear. Once you know the direction where it's safe to move, you take a step and repeat the process of tapping and stepping.
Tapping the ground is a function evaluation. Stepping is an iteration. One step (iteration) may require multiple taps (function evaluations) to complete.
  3 Kommentare
Bruno Luong
Bruno Luong am 13 Aug. 2019
Bearbeitet: Bruno Luong am 13 Aug. 2019
If you provide the Jacobian the number of function evaluations will be close to the number iterations.
If not the minimizer needs to evaluation additional N function-evaluations per iteration and estimate the Jacobian by finite difference. So the number of function evaluations is roughly N x m, whener N is the number of unkown parameter and m the number of iterations.
Beside that there is also some extra function evaluation duting a "line search" meaning once the descent direction is known, the optimizer might need more than 1 iteration to goes down before changing the direction.
On top of that the selected algoritm also affect both counters for reach the same performance.
To set correctly the parameters, the most important thing to know is whereas you provide or not the Jacobian to the minimizer.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by