-
- Downloads
[SPARK-14610][ML] Remove superfluous split for continuous features in decision tree training
## What changes were proposed in this pull request? A nonsensical split is produced from method `findSplitsForContinuousFeature` for decision trees. This PR removes the superfluous split and updates unit tests accordingly. Additionally, an assertion to check that the number of found splits is `> 0` is removed, and instead features with zero possible splits are ignored. ## How was this patch tested? A unit test was added to check that finding splits for a constant feature produces an empty array. Author: sethah <seth.hendrickson16@gmail.com> Closes #12374 from sethah/SPARK-14610.
Showing
- mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala 15 additions, 16 deletions...in/scala/org/apache/spark/ml/tree/impl/RandomForest.scala
- mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala 37 additions, 7 deletions...ala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala
Please register or sign in to comment