Skip to content

Commit 298f405

Browse files
committed
Typo fix
1 parent 45ed914 commit 298f405

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mllib/src/main/scala/org/apache/spark/ml/feature/StandardScaler.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)