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

    https://github.com/apache/spark/pull/2868#discussion_r19177832
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
    @@ -515,6 +523,34 @@ object DecisionTree extends Serializable with Logging {
         }
     
         /**
    +     * Do the same thing as bingSeqOp, but with nodeIdCache.
    +     */
    +    def binSeqOpWithNodeIdCache(
    +        agg: Array[DTStatsAggregator],
    +        dataPoint: (BaggedPoint[TreePoint], Array[Int])): 
Array[DTStatsAggregator] = {
    +      treeToNodeToIndexInfo.foreach { case (treeIndex, nodeIndexToInfo) =>
    +        val baggedPoint = dataPoint._1
    +        val nodeIdCache = dataPoint._2
    +        val nodeIndex = nodeIdCache(treeIndex)
    +        val nodeInfo = nodeIndexToInfo.getOrElse(nodeIndex, null)
    +        // We are processing this point only if it's in the 
nodeIndexToInfo map.
    --- End diff --
    
    Could the chunk of code below be removed into another function so that it 
is not duplicated in binSeqOp?  The function could sit outside of 
findBestSplits().


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