User`s guide
Fitting the Data
1-13
To resolve this issue, examine the confidence bounds for the remaining fits. By
default, 95% confidence bounds are calculated. You can change this level by
selecting the menu item
View->Confidence Level from the Curve Fitting Tool.
The
p1, p2, and p3 coefficients for the fifth degree polynomial suggest that it
overfits the census data. However, the confidence bounds for the quadratic fit,
poly2, indicate that the fitted coefficients are known fairly accurately.
Therefore, after examining both the graphical and numerical fit results, it
appears that you should use
poly2 to extrapolate the census data.
Note The fitted coefficients associated with the constant, linear, and
quadratic terms are nearly identical for each polynomial equation. However,
as the polynomial degree increases, the coefficient bounds associated with the
higher degree terms increase, which suggests overfitting.
For more information about confidence bounds, refer to “Confidence and
Prediction Bounds” on page 3-32.
Saving the Fit Results
By clicking the Save to workspace button, you can save the selected fit and
the associated fit results to the MATLAB workspace. The fit is saved as a
MATLAB object and the associated fit results are saved as structures. This
example saves all the fit results for the best fit,
poly2.
fittedmodel1 is saved as a Curve Fitting Toolbox cfit object.
whos fittedmodel1
Name Size Bytes Class
fittedmodel1 1x1 6178 cfit object
Grand total is 386 elements using 6178 bytes