Skip to main content

Module regression

Module regression 

Source
Expand description

Regression estimators (ISL ch 3, 6). Built on linear_algebra + statistics.

  • linear — multiple OLS with full inference.

Ridge / lasso / PCR / PLS land here next (build order in stats_plan.md).

Re-exports§

pub use bayesian::BayesianLinear;
pub use lasso::fit as fit_lasso;
pub use lasso::LassoModel;
pub use linear::fit as fit_linear;
pub use linear::LinearModel;
pub use pcr::PcrModel;
pub use pls::fit as fit_pls;
pub use pls::PlsModel;
pub use ridge::fit as fit_ridge;
pub use ridge::RidgeModel;

Modules§

bayesian
Bayesian linear regression (PRML ch 3.3) — a conjugate Gaussian model that returns a predictive distribution (mean + variance), not just a point estimate. This is the mission-aligned payoff: a model that can say “ŷ, and here is how sure” — calibrated uncertainty, with the predictive variance widening away from the data.
lasso
Lasso regression (ISL ch 6.2.2) — L1-penalized least squares by cyclic coordinate descent with soft-thresholding.
linear
Multiple linear regression (ISL ch 3) — ordinary least squares with full inference, solved through the engine’s linear-algebra library (no re-implemented solver) and the statistics distributions (real p-values).
pcr
Principal Components Regression (ISL ch 6.3.1) — regress the response on the first m principal components of the predictors. Reuses dimensionality::pca for the projection and regression::linear for the OLS (no duplicated math): it is literally PCA followed by least squares on the component scores, which tames collinearity by discarding low-variance directions.
pls
Partial Least Squares regression (ISL ch 6.3.2) — PLS1 (univariate response) by the NIPALS algorithm. Unlike PCR (which picks directions of high predictor variance), PLS picks directions of high covariance with the response. The small component-space solve reuses linear_algebra::qr (no new solver). Kernel-class DenseLinear.
ridge
Ridge regression (ISL ch 6.2.1, PRML ch 3) — L2-penalized least squares.