Skip to main content

bootstrap_sample

Function bootstrap_sample 

Source
pub fn bootstrap_sample<R: Rng + ?Sized>(
    data: &DMatrix<f64>,
    rng: &mut R,
) -> DMatrix<f64>
Expand description

Bootstrap resample from a dataset.

Generate a bootstrap sample by sampling with replacement.

§Arguments

  • data - Original data matrix
  • rng - Random number generator

§Returns

Bootstrap sample with the same dimensions as the original data.