1
$\begingroup$

I have a doubt. I am currently using an integrated gradient for the DNN model for explainability. In that, we can specify the baseline as a parameter to the function. I am using all zeros for this. I am using alibi library for this.

When coming to the non-differentiable models, I am using Shapley values in the shap library. I understand that Shapley works by taking a subset of the features. Can we add a baseline similar to the IG to the Shapley? In other words, feature less model, all zeros. And see how the model performs on that.

$\endgroup$

1 Answer 1

0
$\begingroup$

Yes you can. If say you are using shap.KernelExplainer then it takes an data argument at initialization. You can just make this a numpy array with all zeros to use that as the background sample.

$\endgroup$
1
  • $\begingroup$ Nice thought. Will look into it. Is it possible to do this for shap.TreeExaplainer because I am using xgboost? $\endgroup$ Jan 10, 2023 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.