# shrinkage::cross\_validation

Shrinkage for Rust · 0.3.0

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

```rust
pub mod cross_validation
```

Training-only regularization paths, held-out scoring, and model selection. 

Each fold fits preprocessing and an entire warm-start path on its training rows. Explicit candidates retain their complete penalties. Automatic paths align by fractions of independently fitted training-fold anchors and disable early stopping. Selection uses equal-weight fold means and their sample standard errors. Only then is a fresh path fitted on all observations. 

Explicit candidates must be ordered from most to least preferred for simplicity. Ties choose the first candidate. The one-standard-error rule chooses the first candidate within one standard error of the minimum. This ordering is caller-defined for independent strengths or weight profiles; no scalar ordering is inferred from a multi-parameter penalty.
