Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nit: mappartitions -> map
  • Loading branch information
zhengruifeng committed Oct 23, 2019
commit 7ec15ed271b8a1b714c06599fff79b462e1dda21
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,11 @@ private[spark] object GradientBoostedTrees extends Logging {
treeWeight: Double,
tree: DecisionTreeRegressionModel,
loss: OldLoss): RDD[(Double, Double)] = {
data.zip(predictionAndError).mapPartitions { iter =>
iter.map { case (Instance(label, _, features), (pred, _)) =>
data.zip(predictionAndError).map {
case (Instance(label, _, features), (pred, _)) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here - it seems like we are ignoring the weight column but intuitively it seems like it should be included, could you explain the reasoning behind it being excluded here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, reading some of the other code this looks like unweighted error. That seems very confusing. I think we could improve this code structure a bit more.

val newPred = updatePrediction(features, pred, tree, treeWeight)
val newError = loss.computeError(newPred, label)
(newPred, newError)
}
}
}

Expand Down