Skip to contents

The infinite-dimensional penalised problem has a finite-dimensional minimiser: a radial basis expansion in r^2 log r at the data points plus a linear null-space term, so it is solved exactly by linear algebra. The penalty annihilates linear functions, so as lambda grows the fit tends to the least-squares PLANE, not to a constant.

Usage

morie_esl_thin_plate_spline(X, y, lambda_ = 1, newdata = NULL)

Arguments

X

Locations, n by 2.

y

Observed values.

lambda_

Smoothing parameter, non-negative.

newdata

Locations to predict at; defaults to X.

Value

List with fitted, delta, beta, residuals, edf, rss, gcv.

Details

Solved on an orthonormal basis of null(A') rather than through the bordered saddle-point system: that matrix has condition number of order lambda, and a relative-cutoff least-squares solve truncates the O(1) linear block outright, so the fit drifts instead of converging.

References

Duchon, J. (1977). Splines minimizing rotation-invariant semi-norms in Sobolev spaces. Springer. Hastie, T., et al. (2009). ESL (2nd ed.), Sec 5.7. Springer.

Examples

set.seed(1)
P <- matrix(runif(50, -1, 1), ncol = 2)
z <- sin(2 * P[, 1]) + P[, 2]^2
max(abs(morie_esl_thin_plate_spline(P, z, lambda_ = 0)$residuals)) < 1e-6
#> [1] TRUE