# Shrinkage for Rust

- **Package:** shrinkage
- **Language:** Rust
- **Version:** 0.3.0
- **License:** [MIT](<license>)
- **Authors:** Johan Larsson \<johan@jolars.co\>

- [Documentation](<https://shrinkage.cc/packages/rust/>)
- [Source repository](<https://github.com/jolars/shrinkage>)
- [License](<license>)

Fit regularized statistical models with reusable datafits, penalties, and solvers. Start with `Lasso` for Gaussian lasso, or compose a `Problem` and select a compatible solver with `fit_with`. 

Enable the matrix integration you need through optional Cargo features. The [installation guide](<../../installation>) lists supported backend versions. The [modeling guide](<../../modeling>) explains coefficient scales, loss normalization, penalties, and intercepts. 

Browse the API reference below, or explore the mathematical definitions of [datafits](<../../datafits/>), [penalties](<../../penalties/>), and [solvers](<../../reference/solvers/>). 

Fitted results retain original-scale coefficients and preprocessing for prediction. Inspect the termination reason and stopping diagnostics before treating a fit as converged. Single typed fits also support `fit_with_observer` for observing accepted optimization states.
