pub struct RepeatedKFold { /* private fields */ }Expand description
Repeated K-Fold cross-validator
Repeats K-Fold n times with different randomization in each repetition. This provides more robust estimates by reducing the variance that comes from a single random split of the data.
§Examples
use sklears_model_selection::{RepeatedKFold, CrossValidator};
let cv = RepeatedKFold::new(5, 3) // 5-fold repeated 3 times
.random_state(42);
let splits = cv.split(100, None);
assert_eq!(splits.len(), 15); // 5 * 3 = 15 splitsImplementations§
Source§impl RepeatedKFold
impl RepeatedKFold
Sourcepub fn random_state(self, seed: u64) -> Self
pub fn random_state(self, seed: u64) -> Self
Sourcepub fn n_splits_per_repeat(&self) -> usize
pub fn n_splits_per_repeat(&self) -> usize
Get the number of splits per repetition
Trait Implementations§
Source§impl Clone for RepeatedKFold
impl Clone for RepeatedKFold
Source§fn clone(&self) -> RepeatedKFold
fn clone(&self) -> RepeatedKFold
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CrossValidator for RepeatedKFold
impl CrossValidator for RepeatedKFold
Auto Trait Implementations§
impl Freeze for RepeatedKFold
impl RefUnwindSafe for RepeatedKFold
impl Send for RepeatedKFold
impl Sync for RepeatedKFold
impl Unpin for RepeatedKFold
impl UnwindSafe for RepeatedKFold
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more