What does the argument 'TolFun' indicate in function 'fit'?
12 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Deepak Meena
2021-3-21
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
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!