Orion
path: sklearn.preprocessing.MinMaxScaler
sklearn.preprocessing.MinMaxScaler
description: this primitive transforms features by scaling each feature to a given range.
see json.
argument
type
description
parameters
X
numpy.ndarray
the data used to compute the per-feature minimum and maximum used for later scaling along the features axis
hyperparameters
feature_range
tuple
desired range of transformed data. Default set to [0, 1]
[0, 1]
copy
bool
if True, a copy of X will be created
output
a transformed version of X
In [1]: import numpy as np In [2]: from mlstars import load_primitive In [3]: X = np.array(range(5)).reshape(-1, 1) In [4]: primitive = load_primitive('sklearn.preprocessing.MinMaxScaler', ...: arguments={"X": X, "feature_range":[0, 1]}) ...: In [5]: primitive.fit() In [6]: primitive.produce(X=X) Out[6]: array([[0. ], [0.25], [0.5 ], [0.75], [1. ]])