Why does cftool gives incorrect result(and different each time) with custom function? (nonlinear least squares method)

1 次查看(过去 30 天)
I try to fit my result using cftool with nonlinear least squares method and custom function.
My custom function has defined functions in Matlab, such like besselk and gamma.
It shows similar trend but it is not correct in theoretically.
Plus, additional problem what I have is that the different fitting results are generated each time.
What is the reason of this problem?
Is there any suggenstion to make reliable fiiting results?

采纳的回答

Walter Roberson
Walter Roberson 2018-8-17
"If no start points (the default value of an empty vector) are passed to the fit function, starting points for some library models are determined heuristically. For rational and Weibull models, and all custom nonlinear models, the toolbox selects default initial values for coefficients uniformly at random from the interval (0,1). As a result, multiple fits using the same data and model might lead to different fitted coefficients"
  2 个评论
Youngju Kim
Youngju Kim 2018-8-18
I'm little bit confused about "start point".
As I know, maybe, cftool of Matlab doesn't have a fit option for "the start point which of the fitting function passes through" in case of using custom equation with nonlinear least squares.
The one thing that I know about start point is the start point of my unknown coefficients within the range that is defined as lower and upper value.
The standard of judging whether it is correct and incorrect, in fitting step, is the theoretical value of the point that the fitting fuction goes through, or the theoretical value of four coefficients(including the range of them).
So, I can make conditions for unknown coefficients but no options for the point value that fitting fuction passes.
Walter Roberson
Walter Roberson 2018-8-18
cftool is a graphical interface for using fittype() and fit(). As is not uncommon, graphical interfaces do not always have access to the full facilities of the routine being called.
You can adjust the permitted range of coefficients in cftool by clicking on "fit options" and modifying the coefficient ranges in the table that is presented.
If you want reproducible results, then turn autofit off in cftool, and use rng() at the MATLAB level to set the random number seed.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by