public class StandardScaler extends java.lang.Object implements Logging
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 |
---|
StandardScaler() |
StandardScaler(boolean withMean,
boolean withStd) |
Modifier and Type | Method and Description |
---|---|
StandardScalerModel |
fit(RDD<Vector> data)
Computes the mean and variance and stores as a model to be used for later scaling.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public StandardScaler(boolean withMean, boolean withStd)
public StandardScaler()
public StandardScalerModel fit(RDD<Vector> data)
data
- The data used to compute the mean and variance to build the transformation model.