Expand description
Regression splines & polynomial regression (ISL ch 7) — flexible non-linear
fits expressed as a linear model in a fixed basis, then solved by OLS
(learning::regression::linear, no new solver).
A degree-d spline with interior knots k₁…k_K uses the truncated power
basis [1, x, …, xᵈ, (x−k₁)ᵈ₊, …, (x−k_K)ᵈ₊]; polynomial regression is the
special case with no knots. The basis columns form the design matrix; the fit is
ordinary least squares over them (kernel-class DenseLinear).
Re-exports§
pub use gam::Gam;pub use smoothing::SmoothingSpline;
Modules§
- gam
- Generalized Additive Model (ISL ch 7.7) —
y = β₀ + Σⱼ fⱼ(xⱼ), eachfⱼa regression spline, fit by backfitting: cycle through the features, fitting each smooth term to the partial residual of all the others. Reusessuper::RegressionSpline(no duplicated basis/OLS). Kernel-classDenseLinear. - smoothing
- Penalized smoothing spline (ISL ch 7.5) — least squares with a roughness penalty that shrinks the wiggly (knot) part of the fit.
Structs§
- Regression
Spline - A fitted regression spline (or polynomial, when
knotsis empty).
Functions§
- polynomial_
regression - Convenience: degree-
degreepolynomial regression (a spline with no knots).