Shrinkage
Big models. Small coefficients.
Fit regularized statistical models with a Rust numerical core. Start with lasso, explore regularization paths, or compose a model from losses, penalties, and solvers.

Models from reusable parts
Combine Gaussian, binomial, and multivariate Gaussian losses with compatible penalties and solvers. Extend the Rust API with your own components.
Dense and sparse matrices
Use faer, nalgebra, ndarray, or sparse CSC matrices. Enable the integrations you need through optional Rust features.
Compose models in Python
Fit Gaussian and logistic models from NumPy arrays with explicit hybrid or proximal-gradient solvers, and inspect predictions and convergence.
Explore regularization
Combine a datafit, a penalty, and a compatible solver to explore a two-coefficient model. Enable JavaScript to adjust the problem and follow the solver toward its optimum. The penalty region uses the budget at the penalized optimum, showing the equivalent constrained problem.
Start with lasso
Fit a Gaussian lasso model with the Rust convenience API:
use Mat;
use Lasso;
By default, Lasso fits an unpenalized intercept and standardizes features using training data. Returned coefficients use the original input scale, and prediction reuses the fitted preprocessing. Check fit.termination() to inspect convergence.
Follow the installation guide to enable the faer feature and run the example. Shrinkage is under development; the Rust and Python packages are available from source and have not yet been published to package registries.
Explore further
Browse the Guide's datafits, models, and penalties for mathematical definitions, constraint plots, and model examples. The solver reference compares supported compositions and convergence diagnostics.
The Rust API supports regularization paths and penalties including lasso, ridge, elastic net, SLOPE, disjoint Group LASSO, clustered lasso, and chain fused lasso. SLOPE and both fusion penalties have dense Gaussian and logistic hybrid solvers. See the Rust API reference for supported combinations and the statistical conventions for loss normalization, penalty scales, and intercept handling.
The Python API provides dense Gaussian lasso and compositional Gaussian and binomial fitting with clustered lasso, chain fused lasso, and SLOPE. Select hybrid or proximal gradient explicitly, predict on new observations, and inspect preprocessing and convergence diagnostics. Both packages share numerical implementations and statistical conventions, with independent versions and release schedules.
To contribute, read the contribution guide.