kernelshap
Different SHAP algorithms
kernelshap makes permutation SHAP practical past eight features, then fixes the kernel weights it had wrong.
◆Recent moves
- 1y ago
Kernel weight bug fixed; parallelism moves to doFuture
A correctness fix in kernel weighting means exact Kernel SHAP finally agrees with exact permutation SHAP; the notes describe the differences as typically small, with models up to second-order interactions unaffected. Parallelism moves to doFuture, changing how packages and globals are declared.
View source ↗ - 1y ago
Sampling permutation SHAP with standard errors
⚡ SPARKPermutation SHAP stops being an exact-only method limited to a handful of features. The antithetic sampling scheme, early stopping and reported standard errors are what push the package past the ceiling its exact algorithms imposed.
View source ↗ - 1y ago
Background data now optional; ranger survival support
Passing a background dataset becomes optional, sampled from the explanation data when it is large enough — one less required argument in the common case. ranger survival models work without a hand-written prediction function, matching the same addition in hstats.
View source ↗ - 2y ago
Factor-valued predictions dropped
Support for factor-valued predictions is removed, the same narrowing hstats applied in its own 1.2.0. A CRAN note is cleared and MASS added for the pseudo-inverse that 0.9.0 later removed again.
View source ↗ - 2y ago
additive_shap() explains additive models exactly
A new explainer for lm, glm, gam, coxph and survreg models uses prediction terms to produce the same values as the general algorithms but far faster. permshap() output folds into the kernelshap class, with an algorithm element recording which method ran.
View source ↗ - 2y ago
Faster on plain data.frames
Performance work: a significant speed-up for pure data.frames, with caching for the all-on and all-off permutations. Incremental, and typical of the steady optimisation between algorithmic releases.
View source ↗