Interface Scaler


public interface Scaler
Scales the numeric variables into the range [0, 1]. If the dataset has outliers, normalization will certainly scale the "normal" data to a very small interval. In this case, the Winsorization procedure should be applied: values greater than the specified upper limit are replaced with the upper limit, and those below the lower limit are replaced with the lower limit. Often, the specified range is indicated in terms of percentiles of the original distribution (like the 5th and 95th percentile).

Note: the inverse transform is lossy for test-time values that fall outside the training range [min, max], because they are clamped to [0, 1] during the forward pass.

See Also:
  • Method Details

    • fit

      static InvertibleColumnTransform fit(DataFrame data, String... columns)
      Fits the data transformation.
      Parameters:
      data - the training data.
      columns - the columns to transform. If empty, transform all the numeric columns.
      Returns:
      the transform.
      Throws:
      IllegalArgumentException - if the data frame is empty or a specified column is non-numeric.