Struct linfa_preprocessing::linear_scaling::FittedLinearScaler[][src]

pub struct FittedLinearScaler<F: Float> { /* fields omitted */ }

The result of fitting a linear scaler. Scales datasets with the parameters learned during fitting.

Implementations

impl<F: Float> FittedLinearScaler<F>[src]

pub fn offsets(&self) -> &Array1<F>[src]

Array of size n_features that contains the offset that will be subtracted to each feature

pub fn scales(&self) -> &Array1<F>[src]

Array of size n_features that contains the scale that will be applied to each feature

pub fn method(&self) -> &ScalingMethod<F>[src]

Returns the method used for fitting. Useful for printing, since ScalingMethod implements Display

Trait Implementations

impl<F: Debug + Float> Debug for FittedLinearScaler<F>[src]

impl<F: Float> Transformer<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedLinearScaler<F>[src]

fn transform(&self, x: Array2<F>) -> Array2<F>[src]

Scales an array of size (nsamples, nfeatures) according to the scaler’s offsets and scales. Panics if the shape of the input array is not compatible with the shape of the dataset used for fitting.

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 FittedLinearScaler<F>[src]

fn transform(
    &self,
    x: DatasetBase<ArrayBase<D, Ix2>, T>
) -> DatasetBase<Array2<F>, T>
[src]

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.

Auto Trait Implementations

impl<F> RefUnwindSafe for FittedLinearScaler<F> where
    F: RefUnwindSafe

impl<F> Send for FittedLinearScaler<F>

impl<F> Sync for FittedLinearScaler<F>

impl<F> Unpin for FittedLinearScaler<F> where
    F: Unpin

impl<F> UnwindSafe for FittedLinearScaler<F> where
    F: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,