pub struct LinearScaler<F: Float> { /* private fields */ }
Expand description
The result of fitting a linear scaler. Scales datasets with the parameters learned during fitting.
Implementations§
Source§impl<F: Float> LinearScaler<F>
impl<F: Float> LinearScaler<F>
Sourcepub fn standard() -> LinearScalerParams<F>
pub fn standard() -> LinearScalerParams<F>
Initializes a Standard scaler
Sourcepub fn standard_no_mean() -> LinearScalerParams<F>
pub fn standard_no_mean() -> LinearScalerParams<F>
Initializes a Standard scaler that does not subract the mean to the features
Sourcepub fn standard_no_std() -> LinearScalerParams<F>
pub fn standard_no_std() -> LinearScalerParams<F>
Initializes a Stadard scaler that does not scale the features by the inverse of the standard deviation
Sourcepub fn min_max() -> LinearScalerParams<F>
pub fn min_max() -> LinearScalerParams<F>
Initializes a MinMax scaler with range 0..=1
Sourcepub fn min_max_range(min: F, max: F) -> LinearScalerParams<F>
pub fn min_max_range(min: F, max: F) -> LinearScalerParams<F>
Initializes a MinMax scaler with the specified minimum and maximum values for the range.
If min
is bigger than max
then fitting will return an error on any input.
Sourcepub fn max_abs() -> LinearScalerParams<F>
pub fn max_abs() -> LinearScalerParams<F>
Initializes a MaxAbs scaler
Source§impl<F: Float> LinearScaler<F>
impl<F: Float> LinearScaler<F>
Sourcepub fn offsets(&self) -> &Array1<F>
pub fn offsets(&self) -> &Array1<F>
Array of size n_features
that contains the offset that will be subtracted to each feature
Sourcepub fn scales(&self) -> &Array1<F>
pub fn scales(&self) -> &Array1<F>
Array of size n_features
that contains the scale that will be applied to each feature
Sourcepub fn method(&self) -> &ScalingMethod<F>
pub fn method(&self) -> &ScalingMethod<F>
Returns the method used for fitting. Useful for printing, since ScalingMethod implements Display
Trait Implementations§
Source§impl<F: Clone + Float> Clone for LinearScaler<F>
impl<F: Clone + Float> Clone for LinearScaler<F>
Source§fn clone(&self) -> LinearScaler<F>
fn clone(&self) -> LinearScaler<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<F: Float> Transformer<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for LinearScaler<F>
impl<F: Float> Transformer<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for LinearScaler<F>
Source§impl<F: Float, D: Data<Elem = F>, T: AsTargets> Transformer<DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>, DatasetBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, T>> for LinearScaler<F>
impl<F: Float, D: Data<Elem = F>, T: AsTargets> Transformer<DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>, DatasetBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, T>> for LinearScaler<F>
Source§fn transform(
&self,
x: DatasetBase<ArrayBase<D, Ix2>, T>,
) -> DatasetBase<Array2<F>, T>
fn transform( &self, x: DatasetBase<ArrayBase<D, Ix2>, T>, ) -> DatasetBase<Array2<F>, T>
Substitutes the records of the dataset with their scaled version. Panics if the shape of the records is not compatible with the shape of the dataset used for fitting.
impl<F: Eq + Float> Eq for LinearScaler<F>
impl<F: Float> StructuralPartialEq for LinearScaler<F>
Auto Trait Implementations§
impl<F> Freeze for LinearScaler<F>where
F: Freeze,
impl<F> RefUnwindSafe for LinearScaler<F>where
F: RefUnwindSafe,
impl<F> Send for LinearScaler<F>
impl<F> Sync for LinearScaler<F>
impl<F> Unpin for LinearScaler<F>
impl<F> UnwindSafe for LinearScaler<F>where
F: UnwindSafe + RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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