Fix gain calculation in multi-target tree. (#9978)

This commit is contained in:
Jiaming Yuan
2024-01-17 13:18:44 +08:00
committed by GitHub
parent 85d09245f6
commit cacb4b1fdd
6 changed files with 132 additions and 65 deletions

View File

@@ -398,8 +398,8 @@ class RegTree : public Model {
if (!func(nidx)) {
return;
}
auto left = self[nidx].LeftChild();
auto right = self[nidx].RightChild();
auto left = self.LeftChild(nidx);
auto right = self.RightChild(nidx);
if (left != RegTree::kInvalidNodeId) {
nodes.push(left);
}