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

SHAP Tree_Explainer failed in notebook #727

Open
vincewu51 opened this issue Dec 8, 2023 · 7 comments
Open

SHAP Tree_Explainer failed in notebook #727

vincewu51 opened this issue Dec 8, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@vincewu51
Copy link
Collaborator

Describe the bug
A clear and concise description of what the bug is.
The SHAP Tree Explainer function doesn't support causal ml causaltree
It is related to issue
Issue 3273
To Reproduce
Steps to reproduce the behavior:
Run notebook
Expected behavior
A clear and concise description of what you expected to happen.
Model type should be supported by TreeExplainer class

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2023-12-08 at 10 10 16 AM

Environment (please complete the following information):

  • OS: [macOS]
  • Python Version: [3.9]

Additional context
Add any other context about the problem here.

@vincewu51 vincewu51 added the bug Something isn't working label Dec 8, 2023
@vincewu51
Copy link
Collaborator Author

@alexander-pv Hi Alexander, I believe this is related to the PR you submitted to SHAP. We are creating this issue so we can track the progress.
Do we have a workaround to run this before they merge the PR?

@alexander-pv
Copy link
Collaborator

Hi, @vincewu51! For now, perhaps, the only way is to install this fork from source. I believe causalml support in shap will be added soon enough. I've just closed my debt there.

@AlanGanem
Copy link

Ive installed the fork youve mentioned but am still getting
InvalidModelError: Model type not yet supported by TreeExplainer: <class 'causalml.inference.tree.causal.causaltree.CausalTreeRegressor'>

Anything i can do about it?

@vincewu51
Copy link
Collaborator Author

Hi @AlanGanem, the fork should be working. If not, SHAP package will merge the PR soon. You can track it here:Issue 3273

@seyidcemkarakas
Copy link

I have created an issue that similar to your problem => #735

Also I have found a way to plot shap values based on uplift_model.get_shap_values function but I am not clear how to define base_value that SHAP local plots requires. Any ideas ?

@jeongyoonlee
Copy link
Collaborator

Hi @AlanGanem, the fork should be working. If not, SHAP package will merge the PR soon. You can track it here:Issue 3273

@alexander-pv, can you follow up on this with the SHAP team? Thanks.

@alexander-pv
Copy link
Collaborator

Hi, all! Over the past few months, there have been over a hundred commits in shap project, so I updated shap/shap#3273 to speedup the process. The PR is expected to be in the next 0.46.0 shap release according to the milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants