pub struct Bootstrap { /* private fields */ }Expand description
Bootstrap sample generator
Creates bootstrap samples (sampling with replacement) for ensemble methods.
Implementations§
Source§impl Bootstrap
impl Bootstrap
Sourcepub fn new(n_samples: Option<usize>, random_state: Option<u64>) -> Self
pub fn new(n_samples: Option<usize>, random_state: Option<u64>) -> Self
Create a new bootstrap sampler
§Arguments
n_samples- Number of samples to draw (None = same as input size)random_state- Random seed for reproducibility
Sourcepub fn sample_multiple(
&self,
n_population: usize,
n_bootstraps: usize,
) -> UtilsResult<Vec<(Vec<usize>, Vec<usize>)>>
pub fn sample_multiple( &self, n_population: usize, n_bootstraps: usize, ) -> UtilsResult<Vec<(Vec<usize>, Vec<usize>)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bootstrap
impl RefUnwindSafe for Bootstrap
impl Send for Bootstrap
impl Sync for Bootstrap
impl Unpin for Bootstrap
impl UnwindSafe for Bootstrap
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