StandardScaler
Transform features by normalizing each feature to have unit standard deviation and/or zero
mean. When
true, it centers the data with mean before scaling.
mean. When
withStd
is true, it scales the data to unit standard deviation. When withMean
istrue, it centers the data with mean before scaling.
Missing values are transformed to 0.0 if
withMean
is true or population mean otherwise.Value members
Methods
def apply(name: String, withStd: Boolean, withMean: Boolean): Transformer[Double, Moments, (Double, Double)]
Create a new StandardScaler instance.
- Value Params
- withMean
-
whether to center the data with mean before scaling
- withStd
-
whether to scale the data to unit standard deviation