Model/Curve Fitting
The curve fitting tool adjusts the chosen equation so that it comes
as close as possible to your data. Each equation has a general form
with
a set of coefficients. A new column containing calculated y-values may
be added to your data table if desired.
A tutorial covering curve fitting is available. Select Open from the
File menu, then look in the Experiments folder to access it.
Curve Fits can be:
Automatic: The program will find
the best values for the coefficients
to fit the curve to the data whenever the user presses the "Try Fit"
button.
If the program is having a difficult time fitting the data, you can
enter
some known starting values for the coefficients, or you can press "Try
Fit" more than once. (Note that if you enter coefficient values
directly,
the dialog switches to Manual -- if you're giving start values for an
automatic
fit, you must check the Automatic radio button again)
Manual (Model): You type in all the coefficient values and
the
program does not do any automatic fitting.
Note: You don't need data if you
simply want to see a function plotted alone on a graph.
- On a graph window, select the range of the graph for which you
want to
fit a curve. If you don't select a range, the curve will be fitted to
the
entire range of data displayed in the graph.
- Select an equation for the curve. Common functions, such as
linear,
exponential,
inverse, and polynomial are included in the list. After you have
selected
a polynomial equation you will be able to adjust the degree. After
you
have selected the variable power and Nth inverse, you will be able to
adjust
the power.
Note: If you do an experiment that requires an equation
not found
on the curve fit list, you can enter the equation in the curve fit
dialog
yourself. Save the file. When that file is opened, the custom equation
will appear in the list. |
- The upper portion of the screen will now contain a graph
displaying the
data and the best fit curve. A box containing information about the
curve
fitting process will appear at the bottom of the screen. The
coefficients
and/or exponents calculated will be presented along with the Root Mean
Square Error*. If the fit seems appropriate, click on the OK
button.
The main screen will appear with the data and fitted curve along with a
helper object that displays curve fitting information. To edit the
object's
properties, double-click the box to summon the Helper
Options dialog box. The helper object
can be hidden to show just the fitted line. Double click the helper and
deselect the "Show On Graph" option. Restore the helper object by
choosing Additional Object Options->Reveal Hidden Objects from the
Options menu.
- You can adjust the parameters of a manual fit after it has been
drawn on the main graph. Click a parameter name in the helper object to
select it. A >> symbol next to the parameter name will appear.
Use the up and down cursor keys to raise or lower the value. Use the
left and right cursor keys to decrease and increase the step size for
changing the value. You can also click the numeric value and type in a
new value. The graph will be updated. Click another parameter to change
it.
Double-clicking the helper object will open its options dialog where
you can change all the values at once.
- You can try new fits by changing either the equation or the range
of
data
selected on the graph, and then clicking the Try Fit button. The curve
fit will be displayed on the graph in the curve fit dialog. You can
select
a region within that graph, zoom in, etc., and the fit you perform will
be applied to your actual graph.
Tip: You can click on Try Fit more than once. Each time you
click
Try Fit, the algorithm starts from the current values of the
coefficients
and iterates closer to a solution.
If you want to exclude points from the fit, return to the page,
select
the point or points you want to exclude in the data table, and select
Strike
Through Data Cells from the Edit menu. Then return to the Curve Fit
dialog to perform a new fit. The selected data points will not be
graphed
nor used in the curve fit.
See also:
Curve Fit Dialog
Linear Fit
*(The Root Mean Square Error is a measure of how far
away,
on average, the data points are from the fitted curve. RMSE is in the
units
of the Y-Axis.)
RMSE
= 
where
f(xi) is the function
evaluated
at the x value xi,
the yi
are the y values of the points, n is
the number of points, and d is the number of free
parameters in
the function f(x).