-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix TreeExplainer instanciation when a tree in LightGBM Classifier model has n_features_in_tree = 1 #310
Conversation
Hey @CharlesCousyn, thank you so much for taking care of this! This is very appreciated! One quick thing. Would you be able to add a very small unit test as a minimal example that would error in the current version without your fix but succeeds with your fix? This way the fix is future proof? I think it would be good if the TreeExplainer is used to explain a very small "model" with only one feature. For this you could use a Custom Tree (here is some info on the custom tree: https://shapiq.readthedocs.io/en/latest/notebooks/tree_notebooks/treeshapiq_custom_tree.html). Best Max! |
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.
Thank you so much!
Could you add a very small unit test as mentioned in the comment?
@mmschlk Done! |
Amazing! I will check it out and merge it! :) Thank you again! :) |
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.
Tested, it on the current main and the bug is fixed. :)
This PR fixes and closes #286 |
Hello,
I am opening this PR to fix the bug mentioned here for the TreeExplainer.
Let me know id it does fix the problem correctly!