# Re: Excel - trend line generators

On 2011-03-17, jbriggs444 <jbriggs444@xxxxxxxxx> wrote:
On Mar 17, 1:25 am, "robertwess...@xxxxxxxxx"
<robertwess...@xxxxxxxxx> wrote:

Basically at that degree of overfit, the polynomial will almost always
have severe excursions just off the data set, and very often between
the fit points. IOW, the resulting interpolation may fit well in a
small region, or in small subsets of a region, but will often take off
in all sorts of improbable directions outside of those small areas.
The polynomial has to roughly match the actual shape of the data in
order to provide a reasonable interpretation, and when has there ever
been a real dataset which was accurately described as a six term
polynomial in the area where all the terms tend to cancel severely.
Let's say you're plotting an actual exponential relationship. For a
small area, you can probably beat a high order polynomial into
providing a reasonable match for the curve in a local area, but as
soon as you step outside of that small area, it will diverge in an
extreme fashion - in that you need to actually provide an
interpolation function that's actually exponential in nature to do a
good job.

Possibly an analogy would be useful.

You can generate trend lines for the motions of the planets
using a model based on cycles and epicycles. You can do
this with 2, 3 or 4 tiers of ever-smaller epicycles on your
cycles. If you add enough epicycles you can always get
a good fit to your data set.

But when you project your trend line out far enough into
the future or if you measure more accurately, the model
turns to crap. You have to keep adding more and more
epicycles to keep up.

It's a bit worse than that, actually. If you fit an epicycle model to
observed planetary motions and tried to extrapolate from it, I'd
expect you to at least see the planets stay more or less at the right
distances from the sun and each other.

If you tried a polynomial fit, however -- even if you did it in polar
coordinates, so that you'd at least have some hope of success in
modelling circular motion -- your model would have all the planets fly
off to interstellar space (or crash into the sun) in rather short
order.

Also, if you tried using a higher-order polynomial, you'd see your
model planets swing wildly around the solar system a few times (even
between your data points, where you know they really did no such
thing) and then shoot off into space even faster.

Essentially, it comes down to the fact that the monomials, being
divergent, make a lousy set of basis functions for extrapolation (and
at higher orders they're not so good for interpolation either).

--
Ilmari Karonen
.

## Relevant Pages

• Re: Excel - trend line generators
... polynomial to fit a curve. ... If you see the use of high degree polynomials you are likely looking at ... using a model based on cycles and epicycles. ... a good fit to your data set. ...
(sci.crypt)
• Re: fitting simultaneously multiple data set
... John D'Errico wrote: ... >> I have two data sets which I want to fit to the same functional ... >> data set 1, y1 ... > same, cat. ...
(comp.soft-sys.matlab)
• Re: fitting simultaneously multiple data set
... > I have two data sets which I want to fit to the same functional form, ... > data set 1, y1 ... The best material model of a cat is another, or preferably the same, cat. ...
(comp.soft-sys.matlab)
• Re: cftool
... There should also be a "new fit" button on the top. ... Click on the Data button and create a data set ... what version of MATLAB, what operating ... the MATLAB prompt to determine the Java version. ...
(comp.soft-sys.matlab)
• Re: cftool
... There should also be a "new fit" button on the top. ... Click on the Data button and create a data set ... what version of MATLAB, what operating ... the MATLAB prompt to determine the Java version. ...
(comp.soft-sys.matlab)