Skip to content
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

Feature interactions #10

Merged
merged 4 commits into from
Sep 25, 2020
Merged

Feature interactions #10

merged 4 commits into from
Sep 25, 2020

Conversation

RAMitchell
Copy link
Contributor

Implements new API function with shap feature interactions.

GPUTreeShapInteractions(X, path.begin(), path.end(), 1, phis.data().get(),
phis.size());
std::vector<float> result(phis.begin(), phis.end());
std::vector<float> expected_result = {
Copy link
Member

Choose a reason for hiding this comment

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

How did you come up with these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's from a simple xgboost tree, I added a comment showing the tree structure.

@@ -173,34 +174,93 @@ TEST_P(ShapSumTest, ShapSum) {
}
}

class ShapInteractionsSumTest : public ::testing::TestWithParam<
Copy link
Member

Choose a reason for hiding this comment

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

That's new to me, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feels pretty clunky compared to hypothesis but it gets us more coverage at least.

@RAMitchell RAMitchell merged commit 5f33132 into rapidsai:main Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants