Curve Fitting Toolbox | ![]() ![]() |
Fitting the Data
You fit data with the Fitting GUI. You open this GUI by clicking the Fitting button on the Curve Fitting Tool. The Fitting GUI consists of two parts: the Fit Editor and the Table of Fits. The Fit Editor allows you to
The Table of Fits allows you to
The Data Fitting Procedure
For this example, begin by fitting the census data with a second degree polynomial. Then continue fitting the data using polynomial equations up to sixth degree, and a single-term exponential equation.
The data fitting procedure follows these general steps:
poly2
.
The Fitting GUI is shown below with the results of fitting the census data with a quadratic polynomial.
The data, fit, and residuals are shown below. You display the residuals as a line plot by selecting the menu item View->Residuals->Line plot from the Curve Fitting Tool.
The residuals indicate that a better fit may be possible. Therefore, you should continue fitting the census data following the procedure outlined in the beginning of this section.
The residuals from a good fit should look random with no apparent pattern. A pattern, such as a tendency for consecutive residuals to have the same sign, can be an indication that a better model exists.
When you fit higher degree polynomials, the Results area displays this warning:
The warning arises because the fitting procedure uses the cdate
values as the basis for a matrix with very large values. The spread of the cdate
values results in scaling problems. To address this problem, you can normalize the cdate
data. Normalization is a process of scaling the predictor data to improve the accuracy of the subsequent numeric computations. A way to normalize cdate
is to center it at zero mean and scale it to unit standard deviation.
To normalize data with the Curve Fitting Tool, select the Center and scale X data check box.
![]() | Importing the Data | Determining the Best Fit | ![]() |