# shrinkage::FoldPath

Shrinkage for Rust · 0.3.0

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

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

One training-fold path and its held-out losses in candidate order. 

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

## Inherent implementation

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

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

<a id="method-path-e79f2278c53ca6fae48c7fa7c801007b3fc9694cf3085ac122c7d61940191b4f"></a>

### `path`

```rust
pub fn path(&self) -> &PathFit<F, P>
```

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

Fits, training preprocessing, complete penalties, and path diagnostics. 

<a id="method-scores-e79f2278c53ca6fae48c7fa7c801007b3fc9694cf3085ac122c7d61940191b4f"></a>

### `scores`

```rust
pub fn scores(&self) -> &[f64]
```

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

Losses averaged within this fold, excluding all penalty terms. 

<a id="method-validation_rows-e79f2278c53ca6fae48c7fa7c801007b3fc9694cf3085ac122c7d61940191b4f"></a>

### `validation_rows`

```rust
pub fn validation_rows(&self) -> &[usize]
```

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

Original observation indices held out for this fold, in increasing order. 

<a id="impl-464f1aa8a6abc5628c5689ec77aa920c1eba6f0f131548cab6eacf76def37d4f"></a>

## Implementation of Clone

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

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

<a id="method-clone-464f1aa8a6abc5628c5689ec77aa920c1eba6f0f131548cab6eacf76def37d4f"></a>

### `clone`

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

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

<a id="impl-81d728267c8726fe5ad1dba9d11d0eed7a02ccfce1bad4122c72648b92cd36b1"></a>

## Implementation of Debug

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

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

<a id="method-fmt-81d728267c8726fe5ad1dba9d11d0eed7a02ccfce1bad4122c72648b92cd36b1"></a>

### `fmt`

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

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

<a id="impl-5648244e535b25a865af53d55f158f54c8826972638fa5f04d026e28dac59934"></a>

## Implementation of Freeze

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

<a id="impl-16b4076c5f719f8422a5db5c3117d748761bcbf1f86a3804108f8c6fcdbb7f6b"></a>

## Implementation of RefUnwindSafe

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

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

## Implementation of Send

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

<a id="impl-91cd754841190d74daedb1830558aef66fa6b96c0659b3ae1539462e0b20f535"></a>

## Implementation of Sync

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

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

## Implementation of Unpin

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

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

## Implementation of UnsafeUnpin

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

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

## Implementation of UnwindSafe

```rust
impl<F, P> UnwindSafe for FoldPath<F, P> where PathFit<F, 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>
```
