pub struct SampleSplitting {
pub n_folds: usize,
pub n_rep: usize,
pub seed: u64,
}Expand description
How observations are split for cross-fitting: n_rep independent
repetitions of seeded K-fold splitting.
Fields§
§n_folds: usize§n_rep: usize§seed: u64Implementations§
Source§impl SampleSplitting
impl SampleSplitting
Sourcepub fn draw(&self, n: usize) -> Result<Vec<Vec<Fold>>>
pub fn draw(&self, n: usize) -> Result<Vec<Vec<Fold>>>
Draw the folds for every repetition. Repetition r uses its own seed
derived from seed, so repetition 0 equals KFold::new(n_folds, seed).
Sourcepub fn draw_clustered(
&self,
clusters: &[Array1<i64>],
) -> Result<Vec<Vec<ClusterFold>>>
pub fn draw_clustered( &self, clusters: &[Array1<i64>], ) -> Result<Vec<Vec<ClusterFold>>>
Cluster-level splits for every repetition (see crate::cluster).
Trait Implementations§
Source§impl Clone for SampleSplitting
impl Clone for SampleSplitting
impl Copy for SampleSplitting
Source§impl Debug for SampleSplitting
impl Debug for SampleSplitting
Source§impl Default for SampleSplitting
impl Default for SampleSplitting
impl Eq for SampleSplitting
Source§impl PartialEq for SampleSplitting
impl PartialEq for SampleSplitting
impl StructuralPartialEq for SampleSplitting
Auto Trait Implementations§
impl Freeze for SampleSplitting
impl RefUnwindSafe for SampleSplitting
impl Send for SampleSplitting
impl Sync for SampleSplitting
impl Unpin for SampleSplitting
impl UnsafeUnpin for SampleSplitting
impl UnwindSafe for SampleSplitting
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