       Smoothing vs. Fitting Splines

• To: mathgroup at smc.vnet.net
• Subject: [mg7171] Smoothing vs. Fitting Splines
• From: Peter Buttgereit <Buttgereit at compuserve.com>
• Date: Tue, 13 May 1997 01:58:10 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Dear Mathgroup,
implementation of Smoothing Splines.
I think I had better defined what I meant with smoothing splines...

Smoothing Splines - contrary to Fitting Splines (SplineFit.m) - do not
interpolate data points but represent an estimate of the smooth part of a
data series.
The basic idea is that the more often a function g  is differenciable and
the smaller the value g^(k)  of the low differenciation order k of that
function, the smoother it will look like. Usually you take k = 2. On the
other hand, you want g to have something to do with your data.
So you have to compromise between these two demands:

Smoothness:     minimise        Intergrate [ d^2 g(t) / dt^2 ]^2 dt

Data representation:    minimise        Sum [ (data(ti) - g(ti) )^2  ]

the latter being the least squares approach.

All in all, the task is then to minimise

beta^2 Sum [ g(ti) - 2 g(ti-1) + g(ti-2)]^2 + Sum [data(ti) - g(ti)]^2

with beta^2 as a Lagrange parameter for smoothness.

Does someone know of a good implementation (in Mathematica)?
I have scanned MathSource; Prest et al. "Numerical recipes..." don't help,
either...