pub struct MinMaxScaler<F: Float> {
pub feature_min: F,
pub feature_max: F,
}Expand description
Parameters for MinMaxScaler (unfitted state).
Scales features to a given range (default [0, 1]):
x_scaled = (x - min) / (max - min) * (feature_max - feature_min) + feature_min
Fields§
§feature_min: F§feature_max: FImplementations§
Source§impl<F: Float> MinMaxScaler<F>
impl<F: Float> MinMaxScaler<F>
Sourcepub fn with_range(self, min: F, max: F) -> Self
pub fn with_range(self, min: F, max: F) -> Self
Set the target feature range (min, max).
Trait Implementations§
Source§impl<F: Clone + Float> Clone for MinMaxScaler<F>
impl<F: Clone + Float> Clone for MinMaxScaler<F>
Source§fn clone(&self) -> MinMaxScaler<F>
fn clone(&self) -> MinMaxScaler<F>
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<F: Float> Default for MinMaxScaler<F>
impl<F: Float> Default for MinMaxScaler<F>
Source§impl<'de, F> Deserialize<'de> for MinMaxScaler<F>where
F: DeserializeOwned + Float,
impl<'de, F> Deserialize<'de> for MinMaxScaler<F>where
F: DeserializeOwned + Float,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F: Float> FitUnsupervised<F> for MinMaxScaler<F>
impl<F: Float> FitUnsupervised<F> for MinMaxScaler<F>
Auto Trait Implementations§
impl<F> Freeze for MinMaxScaler<F>where
F: Freeze,
impl<F> RefUnwindSafe for MinMaxScaler<F>where
F: RefUnwindSafe,
impl<F> Send for MinMaxScaler<F>
impl<F> Sync for MinMaxScaler<F>
impl<F> Unpin for MinMaxScaler<F>where
F: Unpin,
impl<F> UnsafeUnpin for MinMaxScaler<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for MinMaxScaler<F>where
F: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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