spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rxin <>
Subject [GitHub] spark pull request: Minor optimizations. Use safer take, tail meth...
Date Wed, 23 Apr 2014 07:29:05 GMT
Github user rxin commented on a diff in the pull request:
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
    @@ -1120,7 +1120,7 @@ object DecisionTree extends Serializable with Logging {
         sc.textFile(dir).map { line =>
           val parts = line.trim().split(",")
           val label = parts(0).toDouble
    -      val features = Vectors.dense(parts.slice(1,parts.length).map(_.toDouble))
    +      val features = Vectors.dense(
    --- End diff --
    by two arrays, i meant one in parts, and the other for the tail, and the map. We should
be able to skip 2 of them.

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

View raw message