Don't use 0 for "fresh leaf". (#5084)

* Allow using right child as marker for Exact tree_method.
This commit is contained in:
Jiaming Yuan
2019-12-05 11:50:51 +08:00
committed by GitHub
parent df9bdbbcb9
commit f3d8536702
2 changed files with 13 additions and 10 deletions

View File

@@ -594,7 +594,7 @@ class ColMaker: public TreeUpdater {
p_tree->ExpandNode(nid, e.best.SplitIndex(), e.best.split_value,
e.best.DefaultLeft(), e.weight, left_leaf_weight,
right_leaf_weight, e.best.loss_chg,
e.stats.sum_hess);
e.stats.sum_hess, 0);
} else {
(*p_tree)[nid].SetLeaf(e.weight * param_.learning_rate);
}