pub struct RepeatedStratifiedKFold<L> { /* private fields */ }Expand description
Repeated stratified K-fold.
The stratified analogue of RepeatedKFold: runs stratified K-fold
n_repeats times with different seeds, preserving class proportions in every
fold of every repeat. Total splits = n_repeats * n_splits.
use ndarray::Array1;
use model_selection_rs::splitters::{CvSplitter, RepeatedStratifiedKFold};
let y = Array1::from(vec![0, 1, 0, 1, 0, 1, 0, 1, 0, 1]);
let rskf = RepeatedStratifiedKFold::new(2, 3, 0, &y).unwrap();
assert_eq!(rskf.n_splits(), 6);Implementations§
Trait Implementations§
Source§impl<L: Clone> Clone for RepeatedStratifiedKFold<L>
impl<L: Clone> Clone for RepeatedStratifiedKFold<L>
Source§fn clone(&self) -> RepeatedStratifiedKFold<L>
fn clone(&self) -> RepeatedStratifiedKFold<L>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<L: Eq + Hash + Clone> CvSplitter for RepeatedStratifiedKFold<L>
impl<L: Eq + Hash + Clone> CvSplitter for RepeatedStratifiedKFold<L>
Auto Trait Implementations§
impl<L> Freeze for RepeatedStratifiedKFold<L>
impl<L> RefUnwindSafe for RepeatedStratifiedKFold<L>where
L: RefUnwindSafe,
impl<L> Send for RepeatedStratifiedKFold<L>where
L: Send,
impl<L> Sync for RepeatedStratifiedKFold<L>where
L: Sync,
impl<L> Unpin for RepeatedStratifiedKFold<L>where
L: Unpin,
impl<L> UnsafeUnpin for RepeatedStratifiedKFold<L>
impl<L> UnwindSafe for RepeatedStratifiedKFold<L>where
L: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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