You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by imatiach-msft <gi...@git.apache.org> on 2017/01/13 23:09:31 UTC

[GitHub] spark pull request #16571: [SPARK-19208][ML] MaxAbsScaler and MinMaxScaler a...

Github user imatiach-msft commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16571#discussion_r96092078
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/feature/MaxAbsScaler.scala ---
    @@ -70,14 +67,40 @@ class MaxAbsScaler @Since("2.0.0") (@Since("2.0.0") override val uid: String)
       @Since("2.0.0")
       override def fit(dataset: Dataset[_]): MaxAbsScalerModel = {
         transformSchema(dataset.schema, logging = true)
    -    val input: RDD[OldVector] = dataset.select($(inputCol)).rdd.map {
    -      case Row(v: Vector) => OldVectors.fromML(v)
    -    }
    -    val summary = Statistics.colStats(input)
    --- End diff --
    
    is it the call to colStats and vector conversion that was so inefficient?  do you have any performance numbers to justify the change, since it does make the code more complicated.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org