#[non_exhaustive]pub struct MinMaxScaler { /* private fields */ }Expand description
Scale features to a [0, 1] range.
Each feature is transformed as: x' = (x - min) / (max - min).
Features with zero range are set to 0.
Implementations§
Source§impl MinMaxScaler
impl MinMaxScaler
Source§impl MinMaxScaler
impl MinMaxScaler
Sourcepub fn fit_sparse(&mut self, features: &CscMatrix) -> Result<()>
pub fn fit_sparse(&mut self, features: &CscMatrix) -> Result<()>
Fit on sparse features.
Computes min/max from sparse columns, accounting for implicit zeros.
Sourcepub fn transform_sparse(&self, features: &CscMatrix) -> Result<CscMatrix>
pub fn transform_sparse(&self, features: &CscMatrix) -> Result<CscMatrix>
Transform sparse features, returning a new CscMatrix.
Trait Implementations§
Source§impl Clone for MinMaxScaler
impl Clone for MinMaxScaler
Source§fn clone(&self) -> MinMaxScaler
fn clone(&self) -> MinMaxScaler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MinMaxScaler
impl Debug for MinMaxScaler
Source§impl Default for MinMaxScaler
impl Default for MinMaxScaler
Auto Trait Implementations§
impl Freeze for MinMaxScaler
impl RefUnwindSafe for MinMaxScaler
impl Send for MinMaxScaler
impl Sync for MinMaxScaler
impl Unpin for MinMaxScaler
impl UnsafeUnpin for MinMaxScaler
impl UnwindSafe for MinMaxScaler
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