shap icon indicating copy to clipboard operation
shap copied to clipboard

ENH: `Explainer` class supports KernelSHAP `algorithm="kernel"`

Open stephenpardy opened this issue 10 months ago • 1 comments

Problem Description

Reopening https://github.com/shap/shap/issues/2506. I would be interested in adding KernelSHAP support to the general Explainer class if users set the algorithm argument to "Kernel"

Alternative Solutions

Users would have to call the KernelSHAP directly. For our users it is convenient to have a single interface into many methods.

Additional Context

No response

Feature request checklist

  • [x] I have checked the issue tracker for duplicate issues.
  • [x] I'd be interested in making a PR to implement this feature

stephenpardy avatar Feb 18 '25 18:02 stephenpardy

Full support for this issue, especially since the implementation of KernelSHAP is very neat, and KernelSHAP has better properties than the permutation explainer when the number of features p is not too small, let's say p > 10.

mayer79 avatar Jun 24 '25 19:06 mayer79