Effacer les filtres
Effacer les filtres

Why curve fitting options give two diffrent results

4 vues (au cours des 30 derniers jours)
Neeta
Neeta le 8 Juil 2013
I am getting two different solutions and goodness of fitting on using same equation and fitting options in Curve fitting tool.
I am using two terms exponential fitting as a*exp(b*x)+c*exp(d*x) with nonlinear LeastSquare , LAR and Trust region algorithm. I am getting goodness of fit : SSE=902.8; RMSE= 1.456
Same equation if I use in custom equation with similar fit options, neither I get similar coefficient values nor similar goodness of fit:
SSE= 8.55 e+14 RMSE= 1.417e+06
Please let me know why it so??
  2 commentaires
Matt J
Matt J le 8 Juil 2013
I don't understand the difference between the two tests. If the equation is the same in both cases and the data is the same in both cases, and the fitting options are the same, then what did you do differently in each case?
Neeta
Neeta le 8 Juil 2013
There is no difference in two tests except (1) I used exponential fitting option and (2) I have used custom equation option. I am surprised to see two different results.

Connectez-vous pour commenter.

Réponse acceptée

Shashank Prasanna
Shashank Prasanna le 8 Juil 2013
Your results will be sensitive to starting point. As long as you use the same equation and a close enough starting point you must get similar results.
Click on Fit Options and see what the bounds and starting point is for the exponential fitting, and use the same for your custom equation.
  1 commentaire
Neeta
Neeta le 8 Juil 2013
I understand initial guess (starting point) affects the convergence of the algorithm. However, when I use same starting point/s as I have used in exponential, custom equation option gives error as "inf computed model function, fitting cannot continue". I have also used similar maxfuncevals and maxIter. Lower and upper bounds are (-inf) and (inf).

Connectez-vous pour commenter.

Plus de réponses (1)

Matt J
Matt J le 8 Juil 2013
Modifié(e) : Matt J le 8 Juil 2013
You might try using instead the custom equation
a*exp(b*x)+c*exp((b+d^2)*x)
This way, the two exponential terms can be distinguished by the solver.

Community Treasure Hunt

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

Start Hunting!

Translated by