public class StandardScaler extends Object
The "unit std" is computed using the corrected sample standard deviation (https://en.wikipedia.org/wiki/Standard_deviation#Corrected_sample_standard_deviation), which is computed as the square root of the unbiased sample variance.
param: withMean False by default. Centers the data with mean before scaling. It will build a dense output, so this does not work on sparse input and will raise an exception. param: withStd True by default. Scales the data to unit standard deviation.
|Constructor and Description|
|Modifier and Type||Method and Description|
Computes the mean and variance and stores as a model to be used for later scaling.
public StandardScaler(boolean withMean, boolean withStd)
public StandardScalerModel fit(RDD<Vector> data)
data- The data used to compute the mean and variance to build the transformation model.