We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a4f6b commit e3f6746Copy full SHA for e3f6746
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala
@@ -104,8 +104,11 @@ class DecisionTree (private val strategy: Strategy) extends Serializable with Lo
104
// Check whether all the nodes at the current level at leaves.
105
val allLeaf = splitsStatsForLevel.forall(_._2.gain <= 0)
106
logDebug("all leaf = " + allLeaf)
107
- if (allLeaf) break = true // no more tree construction
108
- else level += 1
+ if (allLeaf) {
+ break = true // no more tree construction
109
+ } else {
110
+ level += 1
111
+ }
112
}
113
114
// Initialize the top or root node of the tree.
0 commit comments