Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/4704#discussion_r28358773
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/feature/StandardScaler.scala ---
@@ -39,18 +50,27 @@ private[feature] trait StandardScalerParams extends
Params with HasInputCol with
@AlphaComponent
class StandardScaler extends Estimator[StandardScalerModel] with
StandardScalerParams {
+ setDefault(withMean -> false, withStd -> true)
+
/** @group setParam */
def setInputCol(value: String): this.type = set(inputCol, value)
/** @group setParam */
def setOutputCol(value: String): this.type = set(outputCol, value)
-
+
+ /** @group setParam */
+ def setWithMean(value: Boolean): this.type = set(withMean, value)
+
+ /** @group setParam */
+ def setWithStd(value: Boolean): this.type = set(withStd, value)
+
override def fit(dataset: DataFrame, paramMap: ParamMap):
StandardScalerModel = {
transformSchema(dataset.schema, paramMap, logging = true)
val map = this.paramMap ++ paramMap
--- End diff --
This should now (after a PR merged yesterday) be:
```
val map = extractParamMap(paramMap)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]