pub struct DataPreprocessor { /* private fields */ }Expand description
Data preprocessor for normalization and standardization.
Implementations§
Source§impl DataPreprocessor
impl DataPreprocessor
Sourcepub fn standardize() -> Self
pub fn standardize() -> Self
Create a new preprocessor with standardization.
Sourcepub fn min_max_normalize() -> Self
pub fn min_max_normalize() -> Self
Create a new preprocessor with min-max normalization.
Sourcepub fn min_max_scale(min: i32, max: i32) -> Self
pub fn min_max_scale(min: i32, max: i32) -> Self
Create a new preprocessor with custom min-max scaling.
Sourcepub fn transform(&self, data: &Array2<f64>) -> TrainResult<Array2<f64>>
pub fn transform(&self, data: &Array2<f64>) -> TrainResult<Array2<f64>>
Transform data using fitted parameters.
Sourcepub fn fit_transform(&mut self, data: &Array2<f64>) -> TrainResult<Array2<f64>>
pub fn fit_transform(&mut self, data: &Array2<f64>) -> TrainResult<Array2<f64>>
Fit and transform in one step.
Sourcepub fn inverse_transform(&self, data: &Array2<f64>) -> TrainResult<Array2<f64>>
pub fn inverse_transform(&self, data: &Array2<f64>) -> TrainResult<Array2<f64>>
Inverse transform to original scale.
Sourcepub fn method(&self) -> PreprocessingMethod
pub fn method(&self) -> PreprocessingMethod
Get the preprocessing method.
Trait Implementations§
Source§impl Clone for DataPreprocessor
impl Clone for DataPreprocessor
Source§fn clone(&self) -> DataPreprocessor
fn clone(&self) -> DataPreprocessor
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 moreAuto Trait Implementations§
impl Freeze for DataPreprocessor
impl RefUnwindSafe for DataPreprocessor
impl Send for DataPreprocessor
impl Sync for DataPreprocessor
impl Unpin for DataPreprocessor
impl UnwindSafe for DataPreprocessor
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