Transforms features by scaling each feature to a given range
Source:R/sklearn-scalers.R
MinMaxScaler.Rd
This estimator scales and translates each feature individually such that it is in the given range on the training set, e.g. between zero and one.
The transformation is given by:
= (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0))
X_std = X_std * (max - min) + min X_scaled
where min, max = feature_range
.
This transformation is often used as an alternative to zero mean, unit variance scaling.
Super classes
rgudhi::PythonClass
-> rgudhi::SKLearnClass
-> rgudhi::BaseScaler
-> MinMaxScaler
Methods
Method new()
The MinMaxScaler class constructor.
Usage
MinMaxScaler$new(feature_range = c(0, 1), copy = TRUE, clip = FALSE)
Arguments
feature_range
A length-2 numeric vector specifying the desired range of transformed data. Defaults to
c(0, 1)
.copy
A boolean value specifying whether to perform in-place scaling and avoid a copy (if the input is already a numpy array). Defaults to
TRUE
.clip
A boolean value specifying whether to clip transformed values of held-out data to provided
feature_range
. Defaults toFALSE
.