Lasso convenience API
Lasso fits the Gaussian L1 model:
It combines Gaussian, L1, and specialized cyclic coordinate descent. The builder fits an unpenalized intercept and standardizes features by default. Returned coefficients and predictions use the original input scale.
Fit and inspect
use Mat;
use ;
Set .normalize(...), .fit_intercept(...), .max_iterations(...), and .terminate_on(...) on the builder. .tolerance(...) selects an absolute KKT tolerance. The default instead uses a relative duality-gap tolerance of 1e-6 when the strength is positive and absolute KKT tolerance 1e-6 at zero.
Regularization paths
fit_path(&x, &y, &lambdas) fits supplied strengths in caller order, reusing preprocessing and solver storage with warm starts. fit_regularization_path(&x, &y, &PathOptions::new()) constructs a decreasing sequence from the zero-coefficient threshold; lambda_max(&x, &y) returns that threshold. Gap Safe screening accelerates paths. Working sets are enabled for single fits and paths and can be controlled separately.
Dense and sparse CSC designs use the same statistical conventions. For backend requirements, see installation. Use typed linear regression composition to select other penalties or solvers.
API: shrinkage::Lasso and shrinkage::LassoFit.
