|
In Section 3.3.4, we focused on the method of least squares. This method uses the sum of the squares of the individual errors at the data points as a definition of aggregate error and attempts to make this total error as small as possible. Now we will consider some other definitions of aggregate error: the largest individual error and the sum of the errors.
Figure 3.8 Cubic of best fit through SAT I data points. Suppose that a function f(x) is used to fit n data
points, and let (xi, yi)
be one of these points. Then the error at this point is given by ei
= |yi-f(xi)|.
The line that minimizes In general, we define the best lp
fit to be the function that minimizes Consider the data points in Figure 3.9.
All but one of the points seem to lie in a straight line;
one of the points is far away from the others.
This point is commonly referred to as an ``outlier.''
These points may be part of the graph of a function with a spike in one area.
If so, a straight line will not do a very good job of fitting the
function.
Another possibility is that the faraway point reflects an error
in measurement or transcribing of the data.
Figure 3.9 Illlustrative scatter plot Figure 3.10 shows the lines resulting from performing the best
l1, l2, and
Figure 3.10 Representation of various lines of best fit. The best l1 fit ignores the outlier and defines a line passing through the remaining points. This is one of the chief characteristics of an l1 fit. It is not heavily influenced by isolated points far from the main grouping of the data. If the isolated point is really in error, then a fit that ignores it is just what we want. However, if the isolated point is a good value, then we may have thrown away some important information. The best Unless there is some particularly compelling reason to choose a different type of fit, computational scientists use a least squares fit. This is the only line of best fit whose coefficients can be computed by solving a linear system of equations, and linear systems can be solved efficiently. The other types of fit involve computational difficulties that make them less attractive. Suppose that we are trying to find the constant function f(x)
= c that best fits a set of data points, y1,
y2,
, yn . We will do this by
finding a value c* that makes For problems that require us to determine more than one coefficient, using the least squares error function allows us to determine the minimum error by solving a linear system (the normal equations). Using Ep, with p > 2, leads to a nonlinear system of equations, which is significantly more difficult to solve. |
Send comments on material to Cynthia Lanius
These pages are maintained by Hilena
Vargas (hvargas@rice.edu)
Updated: March 1, 2001
Copyright © 2001 Richard Tapia and Cynthia Lanius