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

    https://github.com/apache/spark/pull/7804#discussion_r35921437
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/GradientBoostedTrees.scala ---
    @@ -184,22 +185,28 @@ object GradientBoostedTrees extends Logging {
           false
         }
     
    +    // Prepare periodic checkpointers
    +    val predErrorCheckpointer = new PeriodicRDDCheckpointer[(Double, 
Double)](
    +      treeStrategy.getCheckpointInterval, input.sparkContext)
    +    val validatePredErrorCheckpointer = new 
PeriodicRDDCheckpointer[(Double, Double)](
    +      treeStrategy.getCheckpointInterval, input.sparkContext)
    +
         timer.stop("init")
     
         logDebug("##########")
         logDebug("Building tree 0")
         logDebug("##########")
    -    var data = input
     
         // Initialize tree
         timer.start("building tree 0")
    -    val firstTreeModel = new DecisionTree(treeStrategy).run(data)
    +    val firstTreeModel = new DecisionTree(treeStrategy).run(input)
         val firstTreeWeight = 1.0
         baseLearners(0) = firstTreeModel
         baseLearnerWeights(0) = firstTreeWeight
     
         var predError: RDD[(Double, Double)] = GradientBoostedTreesModel.
           computeInitialPredictionAndError(input, firstTreeWeight, 
firstTreeModel, loss)
    +    predErrorCheckpointer.update(predError)
    --- End diff --
    
    This update must happen right after the RDD is constructed, before it is 
materialized.


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