shrinkage::FoldAssignments
Shrinkage for Rust · rust · 0.3.0
Source: src/cross_validation/folds.rs
Validated, zero-based held-out fold identifiers in original row order.
Every identifier from zero through nfolds - 1 must occur. At least two nonempty folds ensure that every row is held out once and trained on in every other fold. Seeded constructors use a fixed SplitMix64 shuffle.
Inherent implementation
Source: src/cross_validation/folds.rs
assignments
Source: src/cross_validation/folds.rs
Held-out fold for each observation in original row order.
fold_sizes
Source: src/cross_validation/folds.rs
Validation observation counts in fold order.
kfold
Source: src/cross_validation/folds.rs
Shuffle observations into folds whose sizes differ by at most one.
The same arguments produce the same assignments across platforms.
Errors
Require 2 <= nfolds <= nobs.
new
Source: src/cross_validation/folds.rs
Validate user-supplied fold identifiers without reordering rows.
Errors
Reject empty input, fewer than two folds, gaps, or out-of-range labels.
nfolds
Source: src/cross_validation/folds.rs
Number of nonempty validation folds.
stratified_binomial
Source: src/cross_validation/folds.rs
Shuffle binary responses separately, balancing each class across folds.
Total fold sizes also differ by at most one. Fractional responses need user-supplied or ordinary shuffled folds. A rare class may still leave a training fold with a boundary response; fitting validates that separately.
Errors
Require binary responses and 2 <= nfolds <= response.len().
Implementation of Clone
Source: src/cross_validation/folds.rs
clone
Source: src/cross_validation/folds.rs
Implementation of Debug
Source: src/cross_validation/folds.rs
fmt
Source: src/cross_validation/folds.rs
Implementation of Eq
Source: src/cross_validation/folds.rs
Implementation of PartialEq
Source: src/cross_validation/folds.rs
eq
Source: src/cross_validation/folds.rs
Implementation of StructuralPartialEq
Source: src/cross_validation/folds.rs
Implementation of Freeze
Implementation of RefUnwindSafe
Implementation of Send
Implementation of Sync
Implementation of Unpin
Implementation of UnsafeUnpin
Implementation of UnwindSafe
Implementation of Any
Implementation of Borrow
Implementation of BorrowMut
Implementation of ByRef
Implementation of CastableFrom
Implementation of CastableFrom
Implementation of CloneToUninit
Implementation of Equivalent
Implementation of Equivalent
Implementation of From
Implementation of Imply
Implementation of Into
Implementation of IntoEither
Implementation of Pointable
Implementation of Read
Implementation of Same
Implementation of Scalar
Implementation of SupersetOf
Implementation of ToOwned
Implementation of TryFrom
Implementation of TryInto
