Github user mengxr commented on a diff in the pull request: https://github.com/apache/spark/pull/1950#discussion_r16279819 --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala --- @@ -1281,7 +1226,8 @@ object DecisionTree extends Serializable with Logging { val gains = Array.ofDim[InformationGainStats](numFeatures, numBins - 1) for (featureIndex <- 0 until numFeatures) { - for (splitIndex <- 0 until numBins - 1) { + val numSplitsForFeature = getNumSplitsForFeature(featureIndex) + for (splitIndex <- 0 until numSplitsForFeature) { --- End diff -- ditto: use `while`
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org