Re: spline interpolation and
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Tue, 15 May 2007 22:47:19 -0400
Frode wrote:
I use an apllication called Praat to extract pitch and energy
contours speech samples. The pitch points are extracted every 0.01
seconds. Export the data into matlab and use spline toolbox for
smooting cubic spile. The command was csaps, have tried other
methods
to "fit" the data but this seems go give me a great approximation
of
the points.
What i meant was that when i reproduce the plot with my original
data
with plot-command matlab draw lines betwen the points and my cubic
spline seems to match this with a few exception. I dont think i can
call this graph "the real" graph. Anyway, i have posted 2 pictures
to
watch then interpolation. Just look at the upper plots, thats the
data. the circles are my points and the dots are lines connecting
the. The other are the spline.
Would be grateful for some help for how to measure some error or
justify this method due to some measures.
link to plots:
<http://www.stromhaug.no/pics/>
Thank you. That helps greatly to understand
what you are doing, especially the plot.
Csaps is a good tool for the approximation
of an underlying functional model from
possibly noisy data points when you don't
know of a good model for your data. Perhaps
I should start by explaining something about
splines and what they represent.
A cubic spline is what I like to call a
metaphorical model. Its a play on words,
but one that makes sense.
Metaphor: "A figure of speech in which
two things are compared by saying one
thing is another." www.educationoasis.com
A cubic spline is actually a mathematical
model of a thin flexible beam, constrained
to pass through a set of points. It is
that curve which has a minimal energy of
bending. Over the years, people (shipwrights,
draftsmen, woodworkers, engineers, etc.)
have found that such a beam generally
produces a nice smooth curve that is
often visually appealing.
A cubic smoothing spline is a variant of
the standard interpolating spline, where
the spline is now allowed to miss the data
points. We minimize a slightly modified
energy functional, that includes both
the bending energy of the flexible "beam"
as well as how well the spline fits the
data.
You will notice here that I've never
really justified the use of a spline for
ANY specific curve fitting problem. There
is no explicit reason how you can justify
the use of a cubic spline to model any
data that is not derived from a thin
flexible beam. On the other hand, splines
are tremendously valuable in a variety
of contexts. They provide a nice smooth
functional relationship that can be fit
easily to many datasets.
The "error" between the spline and your
data is composed of both any noise in
the data and something normally called
"lack-of-fit". Lack-of-fit is difficult
to quantify, since it represents the
extent that the spline model cannot
truly represent the true underlying
functional relationship in your data.
There is no reason why you cannot use
standard measures of quality of fit,
such as RMSE (root-mean-squared-error)
or R^2 if you wish to compare one fit
to another. Personally, I prefer to use
my eyes. If the spline model makes my
eyes happy, replicating the expected
shape of my curve, then the fit is good.
Its generally all I need.
Feel free to ask again if I can be of
more help.
HTH,
John
.
- Follow-Ups:
- Re: spline interpolation and
- From: Frode
- Re: spline interpolation and
- References:
- spline interpolation and "error"
- From: Frode
- Re: spline interpolation and
- From: John D'Errico
- Re: spline interpolation and
- From: Frode
- spline interpolation and "error"
- Prev by Date: Re: questions about convolution theorem and de-conv
- Next by Date: How to confiure MATLAB 2007a to utilize muli-core CPU
- Previous by thread: Re: spline interpolation and
- Next by thread: Re: spline interpolation and
- Index(es):
Relevant Pages
|
Loading