An Overview of Smoothing Splines
Consider this criterion for fitting a smooth function to some data: The first term is RSS, and tries to make match the data at each .
The second term is a roughness penalty and controls how wiggly is. It is modulated by the tuning parameter .
- If is very smooth, then will be close to constant and will take on a small value. Conversely, if is jumpy and variable than will vary significantly and will take on a large value.
- The smaller , the more wiggly the function, eventually interpolating when . As , the function becomes linear.
Choosing the Smoothing Parameter
We have seen that a smoothing spline is simply a natural cubic spline with knots at every unique value of . The roughness penalty still controls the roughness via .
Smoothing splines avoid the knot-selection issue, leaving a single to be chosen.
The algorithmic details are too complex to describe here. In R, the function
smooth.spline()
will fit a smoothing spline.The vector of fitted values can be wiritten as , where is a matrix.
The effective degrees of freedom are given by: We can specify rather than !