pub struct AmplitudePhasePerturbation {
pub name: String,
pub magnitude_std: f64,
pub phase_std: f64,
pub is_time_domain: bool,
/* private fields */
}Expand description
This augmenter perturbs the frequency representation of each time series by adding Gaussian noise
to the magnitude and phase of each frequency bin. If is_time_domain is true, the input is first
transformed to the frequency domain using FFT, the perturbation is applied, and then the result is
transformed back to the time domain using IFFT.
The standard deviations of the noise for magnitude
and phase are controlled by magnitude_std and phase_std, respectively.
Fields§
§name: String§magnitude_std: f64§phase_std: f64§is_time_domain: boolImplementations§
Trait Implementations§
Source§impl Augmenter for AmplitudePhasePerturbation
impl Augmenter for AmplitudePhasePerturbation
Source§fn augment_batch(&self, data: &mut Dataset, _parallel: bool, per_sample: bool)
fn augment_batch(&self, data: &mut Dataset, _parallel: bool, per_sample: bool)
Augment a whole batch Read more
Source§fn get_probability(&self) -> f64
fn get_probability(&self) -> f64
Get the probability that this augmenter will augment a series in a batch
Source§fn set_probability(&mut self, probability: f64)
fn set_probability(&mut self, probability: f64)
By setting a probability with this function the augmenter will only augment a series in a
batch with the specified probability
fn get_name(&self) -> String
Source§fn supports_per_sample(&self) -> bool
fn supports_per_sample(&self) -> bool
Indicate whether this augmenter supports per-sample chaining.
By default, return true. Augmenters that need a batch level view
should override this to return false.
Auto Trait Implementations§
impl Freeze for AmplitudePhasePerturbation
impl RefUnwindSafe for AmplitudePhasePerturbation
impl Send for AmplitudePhasePerturbation
impl Sync for AmplitudePhasePerturbation
impl Unpin for AmplitudePhasePerturbation
impl UnwindSafe for AmplitudePhasePerturbation
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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