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

    https://github.com/apache/spark/pull/10231#discussion_r56742884
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala ---
    @@ -956,7 +956,7 @@ private[ml] object RandomForest extends Logging {
             valueCounts.map(_._1)
           } else {
             // stride between splits
    -        val stride: Double = featureSamples.length.toDouble / (numSplits + 
1)
    +        val stride: Double = featureSamples.size.toDouble / (numSplits + 1)
    --- End diff --
    
    This will do a second pass over the `Iterable`. Would it be preferable to 
combine this into the `foldLeft` above so it only does a single pass?


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