Skip to content

Commit

Permalink
fix multi set stat.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Apr 8, 2020
1 parent 18f1d99 commit 9b56ca0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/xgboost/tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ class RegTree : public Model {
(*this)[nid].SetLeftChild(kInvalidNodeId);
(*this)[nid].SetRightChild(kInvalidNodeId);

this->multi_target_stats_.Set(nid, 0, leaf, sum_hess);
if (sum_hess.size() != 0) {
this->multi_target_stats_.Set(nid, 0, leaf, sum_hess);
}
}
void SetLeaf(float const& leaf, bst_node_t nid,
double sum_hess = 0) {
Expand Down

0 comments on commit 9b56ca0

Please sign in to comment.