File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
mllib/src/main/scala/org/apache/spark/ml/feature Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class StandardScaler extends Estimator[StandardScalerModel] with StandardScalerP
5656 /** @group setParam */
5757 def setOutputCol (value : String ): this .type = set(outputCol, value)
5858
59- /** @grour setParam */
59+ /** @group setParam */
6060 def setWithMean (value : Boolean ): this .type = set(withMean, value)
6161
6262 /** @group setParam */
@@ -66,8 +66,9 @@ class StandardScaler extends Estimator[StandardScalerModel] with StandardScalerP
6666 transformSchema(dataset.schema, paramMap, logging = true )
6767 val map = this .paramMap ++ paramMap
6868 val input = dataset.select(map(inputCol)).map { case Row (v : Vector ) => v }
69- val scaler = new feature.StandardScaler (withMean = map(withMean), withStd = map(withStd)).fit(input)
70- val model = new StandardScalerModel (this , map, scaler)
69+ val scaler = new feature.StandardScaler (withMean = map(withMean), withStd = map(withStd))
70+ val scalerModel = scaler.fit(input)
71+ val model = new StandardScalerModel (this , map, scalerModel)
7172 Params .inheritValues(map, this , model)
7273 model
7374 }
You can’t perform that action at this time.
0 commit comments