Re: Interpolation : value at endpoint.
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Sat, 11 Mar 2006 16:02:54 -0500
Vassili wrote:
Sorry for intervention, but I think if this discussion is for every
Its a good question.
ear, it would be nice to explain what is the problem. I have read
once "not-a-knot" end condition, but I have forgotten it. Is this
condition y''=0 at the ends or not? I have personally confronted
the
interpolation problematics at the boundaries of interpolation
interval (happily, not with splines). I should say, it has more
phylosophycal or physical than pure mahematical nature.
Absolutely correct, as I'll discuss below.
So, if you want to show that you can speak some unclear for other
language, you have your email. If you want that others understand
what is the problem and which approaches to its solution do you
discuss, it would be nice to have at least some simple example,
if
any clear formulations ab initio are too difficult for you.
"Not-a-knot" is actually a very descriptive name,
at least once you know what it is describing.
I'll start with the more traditional end conditions,
since you mention them. The standard derivation of
a cubic spline rests on the calculus of variations,
and a solution for the deflection of a thin flexible
beam, forced to pass through a set of fixed points.
The name spline itself goes back to this same thin
beam as used by draftsmen and shipwrights.
This model for the thin beam has two unspecified
parameters, the end conditions. The appropriate end
conditions for the beam model from the calculus of
variations are known as the natural end conditions,
which imply that y'' = 0 at each end of the spline.
This is of course the source of the name "natural"
spline.
The fact is however, y''=0 is a poor choice for many
of the real life curves we choose to model. Its merely
a carryover from the use of a model of a thin flexible
beam. I call it metaphorical baggage, since any such
mathematical model can be thought of as a mathematical
metaphor - a metaphorical model.
So, if you intend to provide two additional pieces of
information about the shape of a spline, what are
better choices to use? You want to specify something
which is least disruptive to the shape of the final
curve. y''=0 at the ends means that there is no
curvature at those points. Its a terrible choice
were you to use a spline to fit cos(x) over the domain
[0,2*pi], but not bad at all if you fit sin(x) over
the very same interval.
The "not-a-knot" end conditions are a good solution.
The traditional cubic spline (not pchip) is a C2
function - twice continuously diferentiable across
the knots. The third derivative of these polynomial
segments is discontinuous however. Since the third
derivative of a cubic spline must be a piecewise
constant function, this makes perfect sense. So the
not-a-not end conditions are such that at the second
knot and the penultimate knot, the cubic spline will
be chosen to be C3 at those knots. This extra degree
of differentiability at those two knots adds two more
pieces of information, so the spline is again well
defined.
Why is this called the not-a-knot end condition?
because when you force the spline to be three times
differentible at those points, it is as if there
never was a knot there in the first place. The
cubic polynomial segments in the first knot interval
and the second knot interval will be in fact the same
functions.
Why is this a better choice of an end condition?
I'd argue that its better because its less assumptive
about the curve shape. It imposes less of a constraint
on the overall shape of the curve.
I did mention that this does not apply to pchip,
which is only a C1 interpolant. It has no need for
such end conditions at all, based on a cubic Hermite
interpolant.
John
.
- Follow-Ups:
- Re: Interpolation : value at endpoint.
- From: Vassili
- Re: Interpolation : value at endpoint.
- References:
- Interpolation : value at endpoint.
- From: diod
- Re: Interpolation : value at endpoint.
- From: John D'Errico
- Re: Interpolation : value at endpoint.
- From: diod
- Re: Interpolation : value at endpoint.
- From: John D'Errico
- Re: Interpolation : value at endpoint.
- From: Vassili
- Interpolation : value at endpoint.
- Prev by Date: Matlab t-shirt.
- Next by Date: Constrained Minimization
- Previous by thread: Re: Interpolation : value at endpoint.
- Next by thread: Re: Interpolation : value at endpoint.
- Index(es):
Relevant Pages
|