pub enum AdaptiveStrategy {
HardSampling {
intensity: f64,
},
EasySampling {
intensity: f64,
},
Uniform,
Uncertainty {
temperature: f64,
},
InverseFrequency {
power: f64,
},
GradientMagnitude {
threshold: f64,
},
}Expand description
Adaptive sampling strategies
These strategies define different approaches for selecting samples based on their characteristics such as difficulty, frequency, or uncertainty.
Variants§
HardSampling
Focus on hard samples (high loss)
Prioritizes samples with high training loss, which are typically harder for the model to learn.
§Arguments
intensity- Controls how strongly to weight hard samples (typically 0.5-2.0)
EasySampling
Focus on easy samples (low loss)
Prioritizes samples with low training loss, which can help with stable training or curriculum learning.
§Arguments
intensity- Controls how strongly to weight easy samples (typically 0.5-2.0)
Uniform
Uniform sampling for exploration
Samples all data points with equal probability, providing a baseline for comparison and ensuring exploration.
Uncertainty
Uncertainty-based sampling
Focuses on samples where the model predictions are most uncertain.
§Arguments
temperature- Controls the sharpness of uncertainty weighting
InverseFrequency
Frequency-based inverse sampling
Prioritizes samples that have been seen less frequently during training, helping to balance the training distribution.
§Arguments
power- Controls the strength of inverse frequency weighting
GradientMagnitude
Gradient-based importance
Focuses on samples that produce gradients above a certain threshold, indicating they contribute significantly to learning.
§Arguments
threshold- Minimum gradient magnitude for inclusion
Trait Implementations§
Source§impl Clone for AdaptiveStrategy
impl Clone for AdaptiveStrategy
Source§fn clone(&self) -> AdaptiveStrategy
fn clone(&self) -> AdaptiveStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdaptiveStrategy
impl Debug for AdaptiveStrategy
Source§impl Default for AdaptiveStrategy
impl Default for AdaptiveStrategy
Source§impl PartialEq for AdaptiveStrategy
impl PartialEq for AdaptiveStrategy
impl StructuralPartialEq for AdaptiveStrategy
Auto Trait Implementations§
impl Freeze for AdaptiveStrategy
impl RefUnwindSafe for AdaptiveStrategy
impl Send for AdaptiveStrategy
impl Sync for AdaptiveStrategy
impl Unpin for AdaptiveStrategy
impl UnsafeUnpin for AdaptiveStrategy
impl UnwindSafe for AdaptiveStrategy
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.