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§

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.