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

    https://github.com/apache/spark/pull/1975#discussion_r16322156
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
    @@ -80,14 +82,12 @@ class DecisionTree (private val strategy: Strategy) 
extends Serializable with Lo
         val maxDepth = strategy.maxDepth
         // the max number of nodes possible given the depth of the tree
         val maxNumNodes = math.pow(2, maxDepth + 1).toInt - 1
    -    // Initialize an array to hold filters applied to points for each node.
    -    val filters = new Array[List[Filter]](maxNumNodes)
    -    // The filter at the top node is an empty list.
    -    filters(0) = List()
         // Initialize an array to hold parent impurity calculations for each 
node.
         val parentImpurities = new Array[Double](maxNumNodes)
         // dummy value for top node (updated during first split calculation)
         val nodes = new Array[Node](maxNumNodes)
    +    val nodesInTree = Array.fill[Boolean](maxNumNodes)(false) // put into 
nodes array later?
    +    nodesInTree(0) = true
    --- End diff --
    
    Is it used anywhere else?


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