Class StandardScalerModel

All Implemented Interfaces:
Serializable, VectorTransformer, scala.Serializable

public class StandardScalerModel extends Object implements VectorTransformer
Represents a StandardScaler model that can transform vectors.

param: std column standard deviation values param: mean column mean values param: withStd whether to scale the data to have unit standard deviation param: withMean whether to center the data before scaling

See Also:
  • Constructor Details

    • StandardScalerModel

      public StandardScalerModel(Vector std, Vector mean, boolean withStd, boolean withMean)
    • StandardScalerModel

      public StandardScalerModel(Vector std, Vector mean)
      std - (undocumented)
      mean - (undocumented)
    • StandardScalerModel

      public StandardScalerModel(Vector std)
  • Method Details

    • mean

      public Vector mean()
    • setWithMean

      public StandardScalerModel setWithMean(boolean withMean)
    • setWithStd

      public StandardScalerModel setWithStd(boolean withStd)
    • std

      public Vector std()
    • transform

      public Vector transform(Vector vector)
      Applies standardization transformation on a vector.

      Specified by:
      transform in interface VectorTransformer
      vector - Vector to be standardized.
      Standardized vector. If the std of a column is zero, it will return default 0.0 for the column with zero std.
    • withMean

      public boolean withMean()
    • withStd

      public boolean withStd()