pub trait Sampler {
    // Required method
    fn sample(
        &mut self,
        rng: &mut StdRng,
        index: &[usize],
        grad: &mut [f32],
        hess: &mut [f32]
    ) -> (Vec<usize>, Vec<usize>);
}

Required Methods§

source

fn sample( &mut self, rng: &mut StdRng, index: &[usize], grad: &mut [f32], hess: &mut [f32] ) -> (Vec<usize>, Vec<usize>)

Sample the data, returning a tuple, where the first item is the samples chosen for training, and the second are the samples excluded.

Implementors§