Effacer les filtres
Effacer les filtres

Programmatically calculate goodness of fit using Curve Fitting Toolbox?

1 vue (au cours des 30 derniers jours)
Tim
Tim le 8 Fév 2014
Commenté : Tim le 10 Fév 2014
Hi,
I am hoping to retrieve the goodness of fit values that the curve fit tool calculates for a custom model, but programatically. My model is:
g=fittype('a*sin(2*pi*25000000*x+b)+c')
which I fit to x and y data with:
f=fit(x,v,g)
(where v is for voltage). This returns the following:
f =
General model:
f(x) = a*sin(2*pi*25000000*x+b)+c
Coefficients (with 95% confidence bounds):
a = -13.03 (-13.04, -13.02)
b = -4.746 (-4.747, -4.745)
c = -0.3985 (-0.4073, -0.3897)
From here I want to see the sum of squares due to error (SSE), R-square, Adjusted R-square, and Root Mean Square Error (RMSE), as a quantitative assessment of the model quality. Does anyone have any solutions? There is no obvious way of retrieving this information listed in the documentation for the toolbox.
Thanks in advance.

Réponse acceptée

Matt J
Matt J le 8 Fév 2014
The FIT command returns goodness of fit info as its second output argument, as documented here

Plus de réponses (0)

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by