CRAN release 0.5.0
New features
New additive explainer additive_shap() that works for models fitted via
lm(),glm(),mgcv::gam(),mgcv::bam(),gam::gam(),survival::coxph(),survival::survreg().
The explainer uses predict(..., type = "terms"), a beautiful trick
used in fastshap::explain.lm(). The result will be identical to those returned by kernelshap() and permshap() but exponentially faster. Thanks David Watson for the great idea discussed in #130.
User visible changes
permshap()now returns an object of class "kernelshap" to reduce the number of redundant methods.- To distinguish which algorithm has generated the "kernelshap" object, the outputs of
kernelshap(),permshap()(andadditive_shap()) got an element "algorithm". is.permshap()has been removed.