pub enum SamplingPolicy {
Sequential,
Shuffled {
seed: u64,
},
BalancedByClass {
seed: u64,
with_replacement: bool,
},
Weighted {
weights: Vec<f32>,
seed: u64,
with_replacement: bool,
},
}Expand description
Sample-order policy used by BatchIterOptions.
Variants§
Trait Implementations§
Source§impl Clone for SamplingPolicy
impl Clone for SamplingPolicy
Source§fn clone(&self) -> SamplingPolicy
fn clone(&self) -> SamplingPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SamplingPolicy
impl Debug for SamplingPolicy
Source§impl PartialEq for SamplingPolicy
impl PartialEq for SamplingPolicy
impl StructuralPartialEq for SamplingPolicy
Auto Trait Implementations§
impl Freeze for SamplingPolicy
impl RefUnwindSafe for SamplingPolicy
impl Send for SamplingPolicy
impl Sync for SamplingPolicy
impl Unpin for SamplingPolicy
impl UnsafeUnpin for SamplingPolicy
impl UnwindSafe for SamplingPolicy
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