# shrinkage::RegularizationPathSolver

Shrinkage for Rust · 0.3.0

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path.rs>)

```rust
pub trait RegularizationPathSolver<Problem>
```

Generate and fit a family-specific regularization path with one preparation. 

<a id="associated-types"></a>

## Associated types

<a id="associated-type-Error"></a>

### `Error`

```rust
type Error;
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path.rs>)

Validation, component, numerical, or backend failure. 

<a id="associated-type-Fit"></a>

### `Fit`

```rust
type Fit;
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path.rs>)

Owned model at each point. 

<a id="associated-type-Penalty"></a>

### `Penalty`

```rust
type Penalty;
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path.rs>)

Complete penalty type retained in the result. 

<a id="methods"></a>

## Methods

<a id="method-maximum_penalty"></a>

### `maximum_penalty`

```rust
fn maximum_penalty(
    &self,
    problem: &Problem
) -> Result<PenaltyMaximum, <Self as RegularizationPathSolver>::Error>
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path.rs>)

Calculate the true zero-coefficient threshold on the optimization scale. 

<a id="method-maximum_penalty-documentation-errors"></a>

#### Errors

Reject undefined null models or invalid components and preserve backend errors. 

<a id="method-solve_regularization_path"></a>

### `solve_regularization_path`

```rust
fn solve_regularization_path(
    &self,
    problem: &Problem,
    options: &PathOptions
) -> Result<PathFit<<Self as RegularizationPathSolver>::Fit, <Self as RegularizationPathSolver>::Penalty>, <Self as RegularizationPathSolver>::Error>
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path.rs>)

Generate and fit a path, starting from the optimized null intercepts. Automatic paths may stop early according to [`PathOptions`](<21f99e48696dcba0a8b440da1f7edf02d640beefa18dad50b5605b9a2811fff1>). 

<a id="method-solve_regularization_path-documentation-errors"></a>

#### Errors

Reject invalid sequence options or fitting failures without a partial path. 

<a id="impl-431fdf1fda1938c7227d80cc0abec98e3338c9d788a70c7cfc141378d52ab119"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path/coordinate.rs>)

```rust
impl<D, P> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for shrinkage::CoordinateDescent where D: shrinkage::SmoothDatafit + NullModelDatafit, P: PathPenalty
```

<a id="impl-32a64d52ee34a7abe920b4ed995b34c792e8c506453b8a623459de03d73cf787"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path/proximal.rs>)

```rust
impl<D, P> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for shrinkage::ProximalGradient<Vec<f64>> where D: SmoothDatafit + NullModelDatafit, P: PathPenalty
```

<a id="impl-2955dac1be8fadde2a6cb49810fb977d9849c0669ea9d2c4e59aac577d103d36"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/hybrid/path.rs>)

```rust
impl<D: shrinkage::PathDatafit, P: PathPenalty, V> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for HybridCoordinateDescent<V>
```

<a id="impl-713b3edbfeeea1beeaa7d41dfbcffe25d2c3368c5a681bbf811bc035e0d7c848"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/hybrid/path.rs>)

```rust
impl<M, D, P, V> RegularizationPathSolver<Problem<&M, D, P>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, D: HybridPathDatafit, P: PathPenalty, <P as PathPenalty>::AtStrength: ReducedCoordinatePenalty, V: ProximalVector
```

<a id="impl-6912f6d03a448f8e91dd34c41e916d2ac936473a8b9ebcac1f64b8defdd95bd5"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path/proximal.rs>)

```rust
impl<M, D, P, V> RegularizationPathSolver<Problem<&M, D, P>> for shrinkage::ProximalGradient<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, D: SmoothDatafit + NullModelDatafit, P: PathPenalty, V: ProximalVector
```

<a id="impl-bcf810d7496113ff8a81e6054808d3369b760e0587e1e0e47b5f76fd1c12b83e"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path/irls.rs>)

```rust
impl<M, D, P> RegularizationPathSolver<Problem<&M, D, P>> for shrinkage::Irls where M: RawColumns<f64> + ColumnStats<f64> + ?Sized, D: QuadraticModelDatafit + NullModelDatafit, P: PathPenalty, <P as PathPenalty>::AtStrength: CoordinatePenalty
```

<a id="impl-17242b767fb81eb76f8498745860b715f63de6bd51a5bbff0aef85f305210067"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/multivariate.rs>)

```rust
impl<M, P, V> RegularizationPathSolver<Problem<&M, MultivariateGaussian<'_>, AxisPenalty<P>>> for shrinkage::ProximalGradient<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, P: PathPenalty, V: ProximalVector
```

<a id="impl-c51e3134067105ad2fd436c3924e323e94b577f4bc64605dcb42f4b8be50030c"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/path/coordinate.rs>)

```rust
impl<M> RegularizationPathSolver<Problem<&M, Gaussian<'_>, L1>> for shrinkage::CoordinateDescent where M: RawColumns<f64> + ColumnStats<f64> + ?Sized
```

<a id="impl-4b68676d80c989180bb8893287beba62ca318509b3cf069d7e8e191d32a1e7c0"></a>

## [Implementation of RegularizationPathSolver](<f0683a430ead6c2ec6bb1d72ad941d17f0612d3092504128df751d377350193c>)

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/solver/proximal/multivariate.rs>)

```rust
impl<P: PathPenalty> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, MultivariateGaussian<'_>, AxisPenalty<P>>> for shrinkage::ProximalGradient<Vec<f64>>
```
