# shrinkage::PathSolver

Shrinkage for Rust · 0.3.0

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

```rust
pub trait PathSolver<Problem, P>
```

Fit an explicit penalty sequence using one prepared problem and workspace. 

<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="methods"></a>

## Methods

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

### `solve_path`

```rust
fn solve_path(
    &self,
    problem: &Problem,
    penalties: Vec<P>
) -> Result<PathFit<<Self as PathSolver>::Fit, P>, <Self as PathSolver>::Error>
```

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

Fit points in caller order, retaining iteration-limit warm starts. 

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

#### Errors

Returns errors without a partial path. No penalty cloning is required. 

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

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

```rust
impl<D, P, Q> PathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>, Q> for shrinkage::CoordinateDescent where D: shrinkage::SmoothDatafit, Q: shrinkage::ProximalPenalty
```

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

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

```rust
impl<D, P, Q> PathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>, Q> for shrinkage::ProximalGradient<Vec<f64>> where D: SmoothDatafit, Q: ProximalPenalty
```

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

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

```rust
impl<D: SmoothDatafit, P, Q: shrinkage::ProximalPenalty, V> PathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>, Q> for HybridCoordinateDescent<V>
```

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

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

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

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

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

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

<a id="impl-0bac03ca5e5b8100fde3e49b05634cf4b4080dc3e43ff1739b16b78af26daf0e"></a>

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

```rust
impl<M, D, P, Q> PathSolver<Problem<&M, D, P>, Q> for shrinkage::Irls where M: RawColumns<f64> + ColumnStats<f64> + ?Sized, D: QuadraticModelDatafit, Q: CoordinatePenalty
```

<a id="impl-2c922a1b51f8422cde6974ec1686ccc2a939cb9ba607b129f0f6e9b60eeff887"></a>

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

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

<a id="impl-6f8fada035423d99ba9aef4396dac45184709dabfc05e11aa6e273b51cfe5b07"></a>

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

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

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

## [Implementation of PathSolver](<f5c72d3e4429c416ab6028c635ab099e02363494611b3296ed38741c10c0f4cf>)

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

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