-
Notifications
You must be signed in to change notification settings - Fork 35
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
Dependent Variables? #317
Comments
Hi! |
Thanks so much fr the response! Would you have any advice about how to code that in a linear regression context? Trying to work through coding simple Shapley examples by hand (i.e. using base R and tidyverse) and struggling to make sure I am doing that correctly. |
No problem. Take a look at Appendix B in the aforementioned paper. There we write out a simplified explicit formula for the linear regression case both when assuming independence and not assuming independence. Assuming a simple dependence structure, it should be straightforward to code it up from there. If you assume e.g. Gaussian features, you could then always double check using the |
Hello! Thank you for all your help. Still trying to understand the best way to code Shapley values from a conceptual standpoint. Say I have From a Shapley standpoint we have
If we define However, these values generated by this method are slightly different than the values generated by the Thank you! |
Just wanted to see if you happened to have a chance to look at this. Thank you so much! |
Hi, sorry, totally forgot about this. What you are talking about above is Shapley regression values, which retrain model on every subset of the features, and predict with those submodels to mimic feature removal. We (and essentially everyone else doing Shapley value based prediction explanation) don't retrain models, but instead, use the expected prediction conditional on different subsets of the features. If you want more information, I suggest looking up "Shapley regression values" (I believe the term is used both for global R squared decomposition and local prediciton explanation), and re-visit our paper in view of that :-) |
Hello! I'm just wondering if you code point me to the right direction for understanding how Shapley deals with dependent or correlated variables? Trying to understand how it is calculated differently under the hood than if all the features are independent. Thank you!
The text was updated successfully, but these errors were encountered: