1.Could you please tell me how Kernel SHAP has implemented (or selected ) the neighbourhood for instance generation in the code.
Good questions. Some of which are best answered by looking at a bare bones brute force implementation of Kernel SHAP: https://github.com/slundberg/shap/blob/master/notebooks/Simple%20Kernel%20SHAP.ipynb
KernelExplainer represents the background. So the base value is just the average output of the model applied to this matrix.Thank you.
According to the basic idea of SHAP, base value is the value predicted by the model without any features. Am I right? So in the bare bones brute force implementation you have taken reference = np.zeros(M) as the base value. Am I right? Could you please tell me what is the variable in original kernel SHAP that you have used as the base value. I couldn't find that in your code.
Thank you.
In the Kernel SHAP implementation the base dataset is provided by the user.
So whatever gets passed as the dataset in the KernelExplainer constructor
becomes the base dataset, and the average output of the model on this
dataset becomes the base value.
On Mon, May 21, 2018 at 2:38 PM Dili notifications@github.com wrote:
Thank you.
According to the basic idea of SHAP, base value is the value predicted by
the model without any features. Am I right? So in the bare bones brute
force implementation you have taken reference = np.zeros(M) as the base
value. Am I right? Could you please tell me what is the variable in
original kernel SHAP that you have used as the base value. I couldn't find
that in your code.Thank you.
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/78#issuecomment-390790838, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADkTxXHxL_U3y9Hmt4uZN4WsGGZwYo0yks5t0zPHgaJpZM4T4Cky
.
Thank you. I got the idea.
Most helpful comment
Good questions. Some of which are best answered by looking at a bare bones brute force implementation of Kernel SHAP: https://github.com/slundberg/shap/blob/master/notebooks/Simple%20Kernel%20SHAP.ipynb
KernelExplainerrepresents the background. So the base value is just the average output of the model applied to this matrix.