Skip to content

Adds trivial TreeExplainer computation and fixes a Bug in parsing xgboost models. #334

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

Merged
merged 12 commits into from
Mar 15, 2025

Conversation

mmschlk
Copy link
Owner

@mmschlk mmschlk commented Mar 15, 2025

Generated with Copilot:

This pull request includes multiple changes to the shapiq project, focusing on bug fixes, feature enhancements, and improvements to the test fixtures. The most important changes include a bug fix for xgboost, a new prediction method, handling trivial computations for single-feature trees, and updates to the test fixtures.

Bug Fixes and Enhancements:

  • Fixed a bug in TreeExplainer for xgboost where trees missing some features caused failures.
  • Added a trivial computation for TreeSHAP-IQ when trees use only one feature, improving efficiency for such cases. [1] [2] [3] [4] [5]

New Methods:

  • Introduced predict_one method in TreeModel to predict the output for a single instance.

Test Fixtures:

  • Added support for xgboost models in the validation and model fixtures. [1] [2]
  • Updated data.py fixtures to ensure deep copies of data are used, preventing unintended modifications during tests. [1] [2] [3]
  • Refactored model fixtures to use the new dataset fixtures and ensure consistency across tests. [1] [2] [3] [4]

@mmschlk mmschlk merged commit 4b2caf8 into main Mar 15, 2025
7 of 8 checks passed
@mmschlk mmschlk deleted the improve-testing branch March 15, 2025 16:05
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.

1 participant