# shrinkage::PathFit

Shrinkage for Rust · 0.3.0

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

```rust
pub struct PathFit<F, P>
```

Owned fits and their penalty settings in the order they were fitted. 

Parameters and diagnostics belong to each fit. Automatic paths additionally retain scalar strengths and distinguish their starting anchor from a true zero-coefficient threshold. Arbitrary explicit paths have no inferred scalar tuning parameter; inspect their complete penalty settings instead. 

<a id="impl-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

## Inherent implementation

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

```rust
impl<F, P> PathFit<F, P>
```

<a id="method-deviances-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `deviances`

```rust
pub fn deviances(&self) -> Option<&[f64]>
```

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

Averaged original-loss deviances, aligned with the fitted automatic points. Unavailable for explicit paths and losses without deviance support. 

<a id="method-fits-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `fits`

```rust
pub fn fits(&self) -> &[F]
```

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

Fitted models, including finite results that reached their iteration limit. 

<a id="method-into_parts-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `into_parts`

```rust
pub fn into_parts(self) -> (Vec<F>, Vec<P>)
```

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

Consume the result and recover its fits and complete penalty settings. 

<a id="method-is_empty-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `is_empty`

```rust
pub fn is_empty(&self) -> bool
```

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

Whether the path contains no points. 

<a id="method-iter-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `iter`

```rust
pub fn iter(&self) -> impl ExactSizeIterator<Item = (&P, &F)>
```

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

Iterate over corresponding penalty settings and fits. 

<a id="method-lambda_start-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `lambda_start`

```rust
pub fn lambda_start(&self) -> Option<f64>
```

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

Starting anchor used for an automatic path, including a caller override. 

<a id="method-lambdas-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `lambdas`

```rust
pub fn lambdas(&self) -> Option<&[f64]>
```

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

Scalar strengths for generated paths and explicit lasso lambda paths. 

<a id="method-len-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `len`

```rust
pub fn len(&self) -> usize
```

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

Number of fitted points. 

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

### `maximum_penalty`

```rust
pub fn maximum_penalty(&self) -> Option<PenaltyMaximum>
```

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

True zero-coefficient threshold, calculated for automatic paths. 

<a id="method-null_deviance-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `null_deviance`

```rust
pub fn null_deviance(&self) -> Option<f64>
```

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

Averaged deviance of the automatic path's optimized zero-coefficient model. Unavailable for explicit paths and losses without deviance support. 

<a id="method-penalties-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `penalties`

```rust
pub fn penalties(&self) -> &[P]
```

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

Complete penalty settings for each fitted point. 

<a id="method-termination-15e7cb961545ccde6d35b328905711840efdccde06b71ab9f784cd3084de011a"></a>

### `termination`

```rust
pub fn termination(&self) -> PathTermination
```

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

Path completion or early stopping, independent of per-model convergence. 

<a id="impl-871fc5622e92737c445baacb6a52bd4771f54bf1929d0f18549ef0a75eed146b"></a>

## Implementation of Clone

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

```rust
impl<F: core::clone::Clone, P: core::clone::Clone> Clone for PathFit<F, P>
```

<a id="method-clone-871fc5622e92737c445baacb6a52bd4771f54bf1929d0f18549ef0a75eed146b"></a>

### `clone`

```rust
fn clone(&self) -> Self
```

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

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

## Implementation of Debug

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

```rust
impl<F: core::fmt::Debug, P: core::fmt::Debug> Debug for PathFit<F, P>
```

<a id="method-fmt-0e46e1b9d25d3a8d181fae4dc3ab83f784db9d8ec7f429b203cdb418066ec473"></a>

### `fmt`

```rust
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
```

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

<a id="impl-9d5f56c03d5cceeb200f18802b5ee1b1aad1658bd275631dd53d5ec469a1f91f"></a>

## Implementation of Freeze

```rust
impl<F, P> Freeze for PathFit<F, P> where Vec<F>: Freeze, Vec<P>: Freeze
```

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

## Implementation of RefUnwindSafe

```rust
impl<F, P> RefUnwindSafe for PathFit<F, P> where Vec<F>: RefUnwindSafe, Vec<P>: RefUnwindSafe
```

<a id="impl-7c4d1e9cc5553125c9ecf23380945e3dab1ef33f86683c16916714b20e20578a"></a>

## Implementation of Send

```rust
impl<F, P> Send for PathFit<F, P> where Vec<F>: Send, Vec<P>: Send
```

<a id="impl-47534bd54e6de285f6aec76e2b5e344bc2a22a562509a6e48a05f7b25e836723"></a>

## Implementation of Sync

```rust
impl<F, P> Sync for PathFit<F, P> where Vec<F>: Sync, Vec<P>: Sync
```

<a id="impl-1d1017a54a77dd5d9397f346f3626e8fba3b29411b2c126153a0d84287886542"></a>

## Implementation of Unpin

```rust
impl<F, P> Unpin for PathFit<F, P> where Vec<F>: Unpin, Vec<P>: Unpin
```

<a id="impl-14e0f2901af3887f2846a3110e84e1ef4cc7522b4aae81fbfff4574538c2f948"></a>

## Implementation of UnsafeUnpin

```rust
impl<F, P> UnsafeUnpin for PathFit<F, P> where Vec<F>: UnsafeUnpin, Vec<P>: UnsafeUnpin
```

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

## Implementation of UnwindSafe

```rust
impl<F, P> UnwindSafe for PathFit<F, P> where Vec<F>: UnwindSafe, Vec<P>: UnwindSafe
```

<a id="impl-1e5682dc18e03c648aa9b125290c107c1e8d96ce8a179a8532e4057da4daf0cd"></a>

## Implementation of Any

```rust
impl<T> Any for T where T: 'static + ?Sized
```

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

## Implementation of Borrow

```rust
impl<T> Borrow<T> for T where T: ?Sized
```

<a id="impl-796e80d926348273a22b04d8e84f510693b11c06ec57c3c3e2e8c1524094a85c"></a>

## Implementation of BorrowMut

```rust
impl<T> BorrowMut<T> for T where T: ?Sized
```

<a id="impl-8360e4092e7ec4a05a26dd304cd739398f0cacc50c8d08dd5be0223d1a08d02e"></a>

## Implementation of ByRef

```rust
impl<T> ByRef<T> for T
```

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

## Implementation of CastableFrom

```rust
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?Sized
```

<a id="impl-97b65e7dfc44b5ecaa495a3a19fe737914a1e9f8532200cf8f46191314e7d777"></a>

## Implementation of CastableFrom

```rust
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?Sized
```

<a id="impl-86d7da2bfd1140cc1675dfe6a975e6a2762338ab32731152da0723858ef3aa81"></a>

## Implementation of CloneToUninit

```rust
impl<T> CloneToUninit for T where T: Clone
```

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

## Implementation of From

```rust
impl<T> From<T> for T
```

<a id="impl-5adf6ca1830f30fbbac655ab8ff394d254954df7ededc7cc833c72fdc87d6f00"></a>

## Implementation of Imply

```rust
impl<T, U> Imply<T> for U where T: ?Sized, U: ?Sized
```

<a id="impl-85eec431edd188129f88290bbcb748e4d2fdc97f7efef3c162b8c252286ffec0"></a>

## Implementation of Into

```rust
impl<T, U> Into<U> for T where U: From<T>
```

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

## Implementation of IntoEither

```rust
impl<T> IntoEither for T
```

<a id="impl-5655b1ef858b34a584cb80104f040c8a4063ced0d281311a0833ed12aefde86e"></a>

## Implementation of Pointable

```rust
impl<T> Pointable for T
```

<a id="impl-8cc2aa01198fc9fa44f08b889f62988d70d2a7f4f0f11f4666d4c08bdaddb22a"></a>

## Implementation of Read

```rust
impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?Sized
```

<a id="impl-5ea09131039c62dd92b119d480a35c7e2b33d2b81dccf0b849f6b1f19f4bda24"></a>

## Implementation of Same

```rust
impl<T> Same for T
```

<a id="impl-7ee6ff38d6674f5edfe4734359062c2a67a572cff5899a89704764822b931c7f"></a>

## Implementation of SupersetOf

```rust
impl<SS, SP> SupersetOf<SS> for SP where SS: SubsetOf<SP>
```

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

## Implementation of ToOwned

```rust
impl<T> ToOwned for T where T: Clone
```

<a id="impl-83960135d00d98080c95a08867729696e36811280c2dd9cf34c1b4fe21c81e18"></a>

## Implementation of TryFrom

```rust
impl<T, U> TryFrom<U> for T where U: Into<T>
```

<a id="impl-1cc495bcaa5112ffb304e7f0de674feca391fd97f47bec86033a9225b72ac05c"></a>

## Implementation of TryInto

```rust
impl<T, U> TryInto<U> for T where U: TryFrom<T>
```
