David L. Miller (joint work with Esther Jones and Jason Matthiopoulos)
ISEC 2012, Oslo, Norway
\[ f(x,y) = {\color{red}\sum_{i=1}^n \delta_i \eta(r_i)} + \sum_{j=1}^3 \alpha_j \phi_j(x,y), \] where \(r_i=\sqrt{(x-x_i)^2+(y-y_i)^2}\)
\[ f(x,y) = \sum_{i=1}^n \delta_i \eta(r_i) + {\color{red}\sum_{j=1}^3 \alpha_j \phi_j(x,y)}, \]
soap)
Thin plate penalty (in 2D, with \(2^\text{nd}\) order derivative penalty): \[ P_{2,2} = \int \int_{\mathbb{R}^2} \left (\frac{\partial^2 f(x,y)}{\partial x^2} \right )^2 + 2\left (\frac{\partial^2 f(x,y)}{\partial x \partial y} \right )^2 + \left (\frac{\partial^2 f(x,y)}{\partial y^2} \right )^2 \text{d}x \text{d}y \] More generally: \[ P_{m,2} = \int \int_{\mathbb{R}^2} \sum_{\nu_1 + \nu_2=m} \frac{m!}{\nu_1! \nu_2!} \left( \frac{\partial^m f \left (x, y \right )}{\partial x^{\nu_1} \partial y^{\nu_2}} \right)^2 \text{d} x \text{d} y \] to ensure that \(f\) remains continuous, \(2m>\) # dimensions (here 2).
\(m\) also dictates # linearly independent polynomials
mgcvbs="ds", then set m=c(1,0.5) and you’re good to gob <- gam(z~s(x, y, k=100), data=dat)b <- gam(z~s(x, y, bs="ds", m=c(1,0.5), k=100), data=dat)m=c(\(m\),\(s\))mgcv