pub struct ScaleAugmenter {
pub scale_range: f64,
}Expand description
Scale augmentation.
Randomly scales the input data by a factor in [1 - scale_range, 1 + scale_range].
Fields§
§scale_range: f64Range of scaling factor (e.g., 0.1 means scale in [0.9, 1.1]).
Implementations§
Source§impl ScaleAugmenter
impl ScaleAugmenter
Sourcepub fn new(scale_range: f64) -> TrainResult<Self>
pub fn new(scale_range: f64) -> TrainResult<Self>
Trait Implementations§
Source§impl Clone for ScaleAugmenter
impl Clone for ScaleAugmenter
Source§fn clone(&self) -> ScaleAugmenter
fn clone(&self) -> ScaleAugmenter
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 DataAugmenter for ScaleAugmenter
impl DataAugmenter for ScaleAugmenter
Source§fn augment(
&self,
data: &ArrayView2<'_, f64>,
rng: &mut StdRng,
) -> TrainResult<Array2<f64>>
fn augment( &self, data: &ArrayView2<'_, f64>, rng: &mut StdRng, ) -> TrainResult<Array2<f64>>
Augment the given data. Read more
Source§impl Debug for ScaleAugmenter
impl Debug for ScaleAugmenter
Auto Trait Implementations§
impl Freeze for ScaleAugmenter
impl RefUnwindSafe for ScaleAugmenter
impl Send for ScaleAugmenter
impl Sync for ScaleAugmenter
impl Unpin for ScaleAugmenter
impl UnwindSafe for ScaleAugmenter
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