pub struct NoiseInjector { /* private fields */ }Implementations§
Source§impl NoiseInjector
impl NoiseInjector
pub fn new(config: NoiseConfig) -> Self
pub fn inject_feature_noise( &mut self, x: &ArrayView2<'_, f64>, ) -> Result<Array2<f64>>
pub fn inject_label_noise( &mut self, y: &ArrayView1<'_, i32>, ) -> Result<Array1<i32>>
pub fn compute_noise_statistics( &self, original: &ArrayView2<'_, f64>, noisy: &ArrayView2<'_, f64>, ) -> NoiseStatistics
Auto Trait Implementations§
impl Freeze for NoiseInjector
impl RefUnwindSafe for NoiseInjector
impl Send for NoiseInjector
impl Sync for NoiseInjector
impl Unpin for NoiseInjector
impl UnwindSafe for NoiseInjector
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> 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