What does the argument 'TolFun' indicate in function 'fit'?

18 Ansichten (letzte 30 Tage)
Shuangfeng Jiang
Shuangfeng Jiang am 11 Nov. 2020
Beantwortet: Deepak Meena am 21 Mär. 2021
I would like to use the fucntion 'fit' to fit my data with the model, and there's the option called 'TolFun' which should be set when adopting the method of nonlinear Least Squares (Details in the help page: https://www.mathworks.com/help/curvefit/fit.html#d122e31414 ).
I know the name 'TolFun' may be a legacy, and it may correspond to 'OptimalityTolerance' or 'FunctionTolerance'. If it corresponds to the latter, is it a relative bound as mentioned in the help page https://www.mathworks.com/help/optim/ug/tolerances-and-stopping-criteria.html ?
If so, how to choose an appropriate value for it geneally when doing curve fitting?

Akzeptierte Antwort

Deepak Meena
Deepak Meena am 21 Mär. 2021
Hi,
TolFun is a lower bound on the change in the value of the objective function during a step. If |f(xi) – f(xi+1)| < TolFun, the iterations end. Solvers generally use TolFun as a relative bound, meaning iterations end when |f(xi) – f(xi+1)| < TolFun(1 + |f(xi)|), or a similar relative measure.
Coming to your question how to choose an appropriate value for it geneally when doing curve fitting , TolFun is not compulsory argument while using the fit function . Be default it takes value of 10^-6 . Try fitting the curve with the default value and See what are your results
Thanks

Weitere Antworten (0)

Kategorien

Mehr zu Least Squares 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