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: Debug + Float> Debug for LinearScaler<F>
impl<F: Debug + Float> Debug for LinearScaler<F>
Source§impl<F: PartialEq + Float> PartialEq for LinearScaler<F>
impl<F: PartialEq + Float> PartialEq for LinearScaler<F>
Source§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>
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.