Why does cftool gives incorrect result(and different each time) with custom function? (nonlinear least squares method)
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Youngju Kim
el 17 de Ag. de 2018
Comentada: Walter Roberson
el 18 de Ag. de 2018
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?
0 comentarios
Respuesta aceptada
Walter Roberson
el 17 de Ag. de 2018
"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 comentarios
Walter Roberson
el 18 de Ag. de 2018
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!