imatiach-msft commented on a change in pull request #25926: [SPARK-9612][ML] 
Add instance weight support for GBTs
URL: https://github.com/apache/spark/pull/25926#discussion_r335029105
 
 

 ##########
 File path: 
mllib/src/main/scala/org/apache/spark/ml/tree/impl/GradientBoostedTrees.scala
 ##########
 @@ -299,26 +317,25 @@ private[spark] object GradientBoostedTrees extends 
Logging {
     baseLearners(0) = firstTreeModel
     baseLearnerWeights(0) = firstTreeWeight
 
-    var predError: RDD[(Double, Double)] =
-      computeInitialPredictionAndError(input, firstTreeWeight, firstTreeModel, 
loss)
+    var predError = computeInitialPredictionAndError(input, firstTreeWeight, 
firstTreeModel, loss)
     predErrorCheckpointer.update(predError)
 
 Review comment:
   if we are going to keep the checkpointing of unweighted error as opposed to 
weighted error, then it would be nice to specify that in the name of the 
checkpointer:
   predUnweigtedErrorCheckpointer
   or alternatively add a comment to make that clear:
   ```
       // Note: this is checkpointing the unweighted error
       predErrorCheckpointer.update(predError) 
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to