Package org.apache.spark.mllib.feature
Class StandardScalerModel
Object
org.apache.spark.mllib.feature.StandardScalerModel
- All Implemented Interfaces:
- Serializable,- 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 SummaryConstructorsConstructorDescriptionStandardScalerModel(Vector std, Vector mean) StandardScalerModel(Vector std, Vector mean, boolean withStd, boolean withMean) 
- 
Method SummaryModifier and TypeMethodDescriptionmean()setWithMean(boolean withMean) setWithStd(boolean withStd) std()Applies standardization transformation on a vector.booleanwithMean()booleanwithStd()Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.mllib.feature.VectorTransformertransform, transform
- 
Constructor Details- 
StandardScalerModel
- 
StandardScalerModel- Parameters:
- std- (undocumented)
- mean- (undocumented)
 
- 
StandardScalerModel
 
- 
- 
Method Details- 
mean
- 
setWithMean
- 
setWithStd
- 
std
- 
transformApplies standardization transformation on a vector.- Specified by:
- transformin interface- VectorTransformer
- Parameters:
- vector- Vector to be standardized.
- Returns:
- Standardized vector. If the std of a column is zero, it will return default 0.0for the column with zero std.
 
- 
withMeanpublic boolean withMean()
- 
withStdpublic boolean withStd()
 
-