Curve Fitting Tool starting points

조회 수: 19 (최근 30일)
Ana Hiza Ramírez Andrade
Ana Hiza Ramírez Andrade 2020년 3월 17일
댓글: Ana Hiza Ramírez Andrade 2020년 3월 23일
Hi all,
I currently working with the Curving Fitting Tool and I would like to know how the toolbox generate the starting points for the optimization (see image attached)
In the website of the toolbox they say that one of the key features are the "optimized starting points" but they don't mentioned anything else about it.
Does anyone know how they are calculated?
Best,
Ana

채택된 답변

Payas Bahade
Payas Bahade 2020년 3월 20일
편집: Payas Bahade 2020년 3월 20일
Hi Ana,
Start points for curve fitting are calculated in following ways:
  1. Starting points for some library models are determined heuristically if no start points (the default value of an empty vector) are passed to the fit function.
  2. 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).
Similar question has been answered in community, please refer this link.
For more details, please refer this doc link on StartPoint.
Hope this helps!
  댓글 수: 2
John D'Errico
John D'Errico 2020년 3월 20일
편집: John D'Errico 2020년 3월 20일
Let me add to what Payas has said -
Starting values can be notoriously difficult to choose for SOME models. For other models, no starting values are even necessary. Thus, for a model where the parameters enter linearly, then a linear regression is sufficient, and nothing special needs be done. For example, any of the polyn or polynm models reduce to a purely linear regression - NO starting values needed, or probably even used, IF you did try to provide them.
Some other models, for example the simple exponential 'exp1' model, which is just a*exp(b*x)? While I don't see the internal code, if it is done intelligently, this model can be transformed using a log transformation. That transformation allows a simple linear fit to be done, which can then be used to give often VERY good starting estimates for the parameters, though not perfect estimates. (I imagine I can come up with a counter-example to that with some effort, as any such heuristic can be gamed by someone who knows what they are doing and wishes to make the algorithm fail.)
Other models, for example splines and things like them, smoothing splines, interpolatory splines, pchip-like C1 interpolants, etc., have no need at all for starting values, due to the nature of the models themselves.
Finally, there are the fully general nonlinear models, which can be arbitrarily complicated, nasty things potentially. In this case nothing intelligent and automatic can possibly be done. So all that is done for most of them is to use some random numbers for a starting guess. That is as good of a choice as any, because there is NO way to provide a truly good choice for many models. These are models where user input is really important, though many users do not understand the issues.
Sadly, if you provide poor choices for many of these general nonlinear models, you should expect garbage as a result in the fit. (And random numbers are often "poor" in this respect.) It is often the user who needs to provide intelligence there. A common example where I see failues is in the sums of exponential class of models, where people simply do not understand that good starting values are now an imperative for convergence to something reasonable to happen.
Can you improve parameter estimation for some specific classes of nonlinear models? Well, yes, you can do so, using parameter partitioning techniques. This is a technique that I have used with great success when it can be appropriate. It removes the need for SOME starting values. But it also creates some difficulties in the end, and will not apply to all such models, so doing so automatically can be an issue.
The point being, were I writing the code myself (I've written similar toolbox code of my own before, so I do know what I am talking about) I would make good choices for the starting parameters to the extent that I could do so. I would recognize that some models need no starting values. And for the rest, well, I would rely on the user knowing what they are doing when that proves necessary. All of that is exactly what was done in the CFT.
Ana Hiza Ramírez Andrade
Ana Hiza Ramírez Andrade 2020년 3월 23일
Thank you both for your help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by