Borrar filtros
Borrar filtros

Programmatically calculate goodness of fit using Curve Fitting Toolbox?

1 visualización (últimos 30 días)
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.

Respuesta aceptada

Matt J
Matt J el 8 de Feb. de 2014
The FIT command returns goodness of fit info as its second output argument, as documented here

Más respuestas (0)

Categorías

Más información sobre Linear and Nonlinear Regression 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!

Translated by