Struct linfa_preprocessing::linear_scaling::LinearScaler[][src]

pub struct LinearScaler<F: Float> { /* fields omitted */ }
Expand description

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

Implementations

Initializes a Standard scaler

Initializes a Standard scaler that does not subract the mean to the features

Initializes a Stadard scaler that does not scale the features by the inverse of the standard deviation

Initializes a MinMax scaler with range [0,1]

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.

Initializes a MaxAbs scaler

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

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

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

Trait Implementations

Formats the value using the given formatter. Read more

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.

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.