Struct smartcore::model_selection::KFold
source · pub struct KFold {
pub n_splits: usize,
pub shuffle: bool,
pub seed: Option<u64>,
}
Expand description
K-Folds cross-validator
Fields§
§n_splits: usize
Number of folds. Must be at least 2.
shuffle: bool
Whether to shuffle the data before splitting into batches
seed: Option<u64>
When shuffle is True, seed affects the ordering of the indices. Which controls the randomness of each fold
Implementations§
source§impl KFold
impl KFold
sourcepub fn with_n_splits(self, n_splits: usize) -> Self
pub fn with_n_splits(self, n_splits: usize) -> Self
Number of folds. Must be at least 2.
sourcepub fn with_shuffle(self, shuffle: bool) -> Self
pub fn with_shuffle(self, shuffle: bool) -> Self
Whether to shuffle the data before splitting into batches
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for KFold
impl Send for KFold
impl Sync for KFold
impl Unpin for KFold
impl UnwindSafe for KFold
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more