-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for eta and mitigate float error. #7446
Conversation
@hcho3 I think I got the CUDA test working again. |
RegTree tree_1; | ||
{ | ||
tree_1.param.num_feature = kCols; | ||
up_1->Update(&gpairs_, p_dmat_.get(), {&tree_1}); | ||
} | ||
tree_0.WalkTree([&](bst_node_t nidx) { | ||
if (tree_0[nidx].IsLeaf()) { | ||
EXPECT_NEAR(tree_1[nidx].LeafValue() * eta, tree_0[nidx].LeafValue(), kRtEps); | ||
} | ||
return true; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these two trees identical when eta
is not the same ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice the multiplication inside the comparison
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh! I didn't see that the first time.
No description provided.