Class 22: Calculating Smoothing Splines


Review from previous class


Smoothing Splines

Lisp files for today's class

Handout
This is a revised draft. It'll never be complete, but this is about all that I intend to add this year.

Bayesian Spin
Though it may be surprising, other arguments lead to the same time of estimating equations. These penalized least squares estimators can also be motivated from a "shrinkage perspective" (as in ridge regression) or by posing a prior distribution located at zero.

Smoothing and cross-validation
The trick in smoothing is to chose the smoothing parameter in the loss function. Once you have picked lambda, the rest of the smoothing is a linear problem (like a regression problem). This conditional linearity suggests a `kludge' for picking lambda from data: pretend the smoothing matrix is a projection matrix and use its diagonal as leverage values.

Computing a Spline
The code in the lisp files for today is pretty fast stuff, converted from the original Fortran code of deBoor. Makes it easy to do things like compute the smoothing matrix quickly. On the Sun, one builds a file like splsm.so using the commands
		       cc -c -xcg92 -xO3 splsm.c
               ld -G -o splsm.so splsm.o
        
Watch out for doing too much optimization; code starts to break here easily.


Next time

So, how does one choose the right smoothing parameter?