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
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>
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.