Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4704#discussion_r25192362
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/StandardScaler.scala ---
    @@ -44,12 +55,18 @@ class StandardScaler extends 
Estimator[StandardScalerModel] with StandardScalerP
     
       /** @group setParam */
       def setOutputCol(value: String): this.type = set(outputCol, value)
    -
    +  
    +  /** @grour 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
         val input = dataset.select(map(inputCol)).map { case Row(v: Vector) => 
v }
    -    val scaler = new feature.StandardScaler().fit(input)
    +    val scaler = new feature.StandardScaler(withMean = map(withMean), 
withStd = map(withStd)).fit(input)
    --- End diff --
    
    line too wide (over 100 chars). Move `.fit(input)` to the next line.


---
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]

Reply via email to