A Gaussian generalised additive model with the identity link specifies
The are unknown smooth functions estimated from the data, rather than necessarily straight lines. The model is additive in their effects, so it does not automatically contain interactions between covariates. To identify the intercept separately from the smooths, impose a constraint such as for each . Linear terms can also be included alongside smooth terms. More generally a specified link function can make additive; for the normal identity-link model the mean itself has the displayed form. Smoothness is typically controlled through a basis and a roughness penalty, preventing an unrestricted smooth from interpolating all the noise.
For , minimize the smoothing spline objective over the Sobolev space of functions with square-integrable second derivative on the observed interval:
The roughness penalty measures curvature; its null space consists of affine functions. To see why the minimizer is a natural cubic spline, let be the natural spline interpolating the values of any competitor at its distinct observation locations, and put . Integration by parts twice on each knot interval gives : on each interval, vanishes at the knots, is continuous, and vanishes at the outer endpoints. Hence
while both functions have the same residual sum of squares. This proves the reduction to a finite-dimensional spline space.
For distinct and , use its -dimensional basis, write , and define the positive semidefinite matrix
The penalized least squares problem is , so
Use linear continuation outside the observation interval. The fitted-value matrix is ; its trace gives the effective degrees of freedom. As decreases to zero, the natural spline approaches interpolation, with trace ; as it grows without bound, the fit approaches ordinary least squares on , with trace two. For the criterion alone does not determine values between observations; the natural interpolant is the limiting convention. Repeated observation locations are combined by using distinct knots and their multiplicities as weights, rather than pretending the spline design has independent interpolation values.
Roughness penalty 2026-10-05
A roughness penalty penalizes variation of derivatives, such as . The second-derivative penalty vanishes precisely on affine functions and is represented in a chosen basis by a roughness penalty matrix.