Min-Max Scaler

Linearly rescales each feature to a common range [min, max] using column summary statistics. The operation is also known as Min-Max normalization or rescaling.

This operation is ported from Spark ML.

For a comprehensive introduction, see Spark documentation.

For scala docs details, see org.apache.spark.ml.feature.MinMaxScaler documentation.

Since: Seahorse 1.0.0

Input

Port Type Qualifier Description
0DataFrameThe input DataFrame.

Output

Port Type Qualifier Description
0DataFrameThe output DataFrame.
1TransformerA Transformer that allows to apply the operation on other DataFrames using a Transform.

Parameters

Name Type Description
input column SingleColumnSelector The input column name.
output SingleChoice Output generation mode. Possible values: ["replace input column", "append new column"]
min Numeric The lower bound after transformation, shared by all features.
max Numeric The upper bound after transformation, shared by all features.

Example

Parameters

Name Value
input column "features"
output append new column
output column "scaled"
min -5.0
max 5.0

Input

features
[1.0,0.0,-9.223372036854776E18]
[2.0,0.0,0.0]
[3.0,0.0,9.223372036854776E18]
[1.5,0.0,0.0]

Output

features scaled
[1.0,0.0,-9.223372036854776E18] [-5.0,0.0,-5.0]
[2.0,0.0,0.0] [0.0,0.0,0.0]
[3.0,0.0,9.223372036854776E18] [5.0,0.0,5.0]
[1.5,0.0,0.0] [-2.5,0.0,0.0]