class StandardScalerModel extends VectorTransformer
Represents a StandardScaler model that can transform vectors.
- Annotations
- @Since( "1.1.0" )
- Source
- StandardScaler.scala
- Alphabetic
- By Inheritance
- StandardScalerModel
- VectorTransformer
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
StandardScalerModel(std: Vector)
- Annotations
- @Since( "1.3.0" )
-
new
StandardScalerModel(std: Vector, mean: Vector)
- Annotations
- @Since( "1.3.0" )
-
new
StandardScalerModel(std: Vector, mean: Vector, withStd: Boolean, withMean: Boolean)
- std
column standard deviation values
- mean
column mean values
- withStd
whether to scale the data to have unit standard deviation
- withMean
whether to center the data before scaling
- Annotations
- @Since( "1.3.0" )
Value Members
-
val
mean: Vector
- Annotations
- @Since( "1.1.0" )
-
def
setWithMean(withMean: Boolean): StandardScalerModel.this.type
- Annotations
- @Since( "1.3.0" )
-
def
setWithStd(withStd: Boolean): StandardScalerModel.this.type
- Annotations
- @Since( "1.3.0" )
-
val
std: Vector
- Annotations
- @Since( "1.3.0" )
-
def
transform(vector: Vector): Vector
Applies standardization transformation on a vector.
Applies standardization transformation on a vector.
- vector
Vector to be standardized.
- returns
Standardized vector. If the std of a column is zero, it will return default
0.0
for the column with zero std.
- Definition Classes
- StandardScalerModel → VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
def
transform(data: JavaRDD[Vector]): JavaRDD[Vector]
Applies transformation on a JavaRDD[Vector].
Applies transformation on a JavaRDD[Vector].
- data
JavaRDD[Vector] to be transformed.
- returns
transformed JavaRDD[Vector].
- Definition Classes
- VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
def
transform(data: RDD[Vector]): RDD[Vector]
Applies transformation on an RDD[Vector].
Applies transformation on an RDD[Vector].
- data
RDD[Vector] to be transformed.
- returns
transformed RDD[Vector].
- Definition Classes
- VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
var
withMean: Boolean
- Annotations
- @Since( "1.3.0" )
-
var
withStd: Boolean
- Annotations
- @Since( "1.3.0" )