sklearn.preprocessing.minmax_scale(X, feature_range=(0, 1), axis=0, copy=True)
[source]
Transforms features by scaling each feature to a given range.
This estimator scales and translates each feature individually such that it is in the given range on the training set, i.e. between zero and one.
The transformation is given by:
X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0)) X_scaled = X_std * (max - min) + min
where min, max = feature_range.
This transformation is often used as an alternative to zero mean, unit variance scaling.
Read more in the User Guide.
New in version 0.17: minmax_scale function interface to sklearn.preprocessing.MinMaxScaler
.
Parameters: |
|
---|
See also
MinMaxScaler
sklearn.pipeline.Pipeline
).For a comparison of the different scalers, transformers, and normalizers, see examples/preprocessing/plot_all_scaling.py.
sklearn.preprocessing.minmax_scale
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.minmax_scale.html