pub struct FeatureScaler;Expand description
Feature scaling utilities
Implementations§
Source§impl FeatureScaler
impl FeatureScaler
Sourcepub fn standard_scale<T>(
data: &Array2<T>,
) -> UtilsResult<(Array2<T>, Array1<T>, Array1<T>)>
pub fn standard_scale<T>( data: &Array2<T>, ) -> UtilsResult<(Array2<T>, Array1<T>, Array1<T>)>
Standard scaling (z-score normalization)
Sourcepub fn minmax_scale<T>(
data: &Array2<T>,
) -> UtilsResult<(Array2<T>, Array1<T>, Array1<T>)>
pub fn minmax_scale<T>( data: &Array2<T>, ) -> UtilsResult<(Array2<T>, Array1<T>, Array1<T>)>
Min-max scaling to [0, 1] range
Sourcepub fn robust_scale<T>(
data: &Array2<T>,
) -> UtilsResult<(Array2<T>, Array1<T>, Array1<T>)>
pub fn robust_scale<T>( data: &Array2<T>, ) -> UtilsResult<(Array2<T>, Array1<T>, Array1<T>)>
Robust scaling using median and IQR
Auto Trait Implementations§
impl Freeze for FeatureScaler
impl RefUnwindSafe for FeatureScaler
impl Send for FeatureScaler
impl Sync for FeatureScaler
impl Unpin for FeatureScaler
impl UnwindSafe for FeatureScaler
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