Re: spline interpolation and
- From: Frode <wang@xxxxxxxxxxxx>
- Date: Wed, 16 May 2007 14:59:33 -0400
John D'Errico wrote:
approximation
Frode wrote:
0.01
I use an apllication called Praat to extract pitch and energy
contours speech samples. The pitch points are extracted every
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
originalof
the points.
What i meant was that when i reproduce the plot with my
thedatacubic
with plot-command matlab draw lines betwen the points and my
spline seems to match this with a few exception. I dont think ican
call this graph "the real" graph. Anyway, i have posted 2pictures
to
watch then interpolation. Just look at the upper plots, thats
connectingdata. the circles are my points and the dots are lines
orthe. The other are the spline.
Would be grateful for some help for how to measure some error
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
Thank you for a deep explanation :)
One last question about doing some(not eye visual) error
computations (visually it seems very good):
The only thing i know about my data are my points , right, i do not
know much about the in between space.
The solution i see is to compare my 'points' to the spline at those
points. Does that sound correct ?
.
- Follow-Ups:
- Re: spline interpolation and
- From: John D'Errico
- 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
- Re: spline interpolation and
- From: John D'Errico
- spline interpolation and "error"
- Prev by Date: Re: Fir filter
- Next by Date: many values in 1 variable
- Previous by thread: Re: spline interpolation and
- Next by thread: Re: spline interpolation and
- Index(es):
Relevant Pages
|
Loading