Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upQuestion on kernel.py of SHAP package #165
Comments
|
Hi @roye10, Sorry for the delay in getting back to you! @slundberg would be the best person to answer this question. We see that you opened an issue on the SHAP repo as well (slundberg/shap#1488), which might be a better place to track a response. Happy to leave this issue open in the meanwhile. -InterpretML Team |
|
Hi InterpretML Team, no worries, thank you for your reply. That is appreciated, thanks! I'll post an update if I get a response or found a response in anyway. -roye10 |
|
Think I found an answer to:
weight vector multiplied by 2, in order to regain weight for one subsample (before weight vector multiplied by two, to account for the complement subset and such that weight vector (including complement subset) sum to 1) |
|
Em parâmetros de desenvolvimento |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

First of all, the package is great! I only have a few technical questions with regards to the kernel.py code of the SHAP package
I am trying to understand how SHAP values are computed by the Kernel SHAP method from the SHAP package. As I understand it, you solve a weighted linear regression to attain SHAP values, using
phi = ((X'WX)^-1)X'Wy.At a high level, wha I gather so far - especially looking at lines
296-343, in combination with the referenced functions:M!possible feature orderings are regardedE[y|X_s] - f_null ) - maskMatrix*( f_x - f_null)Did I understand this correctly?
If so, there are a few things, however, I would like to ask:
Because even for 47 features onwards, if I understand it correctly, only subsets of size 1 (and its complement) are considered fully.
Thank you very much in advance!