Expand description
The cubic smoothing spline (SciPy’s make_smoothing_spline): the function g minimising
Σ wᵢ (yᵢ − g(xᵢ))² + λ ∫ g''(x)² dx,
which is a natural cubic spline with knots at the data. Large λ approaches the straight-line
least-squares fit, λ → 0 the interpolating natural spline. When λ is not given, it is
chosen by generalised cross-validation (GCV).
See the book entry B-splines and smoothing splines.
Structs§
- Smoothing
Spline - The result of
make_smoothing_spline: the spline and the smoothing parameter used.
Functions§
- make_
smoothing_ spline - The cubic smoothing spline of
(x, y)with weightsw(default 1) and smoothing parameterlam(SciPy’smake_smoothing_spline). Withoutlam, the parameter minimising the GCV scoren ‖y − ŷ‖² / (n − tr A(λ))²over0 < λ < nis used, found by the same bounded Brent search as SciPy.