Releases: ModelOriented/kernelshap
CRAN release 0.7.0
This release is intended to be the last before stable version 1.0.0.
Major change
Passing a background dataset bg_X
is now optional.
If the explanation data X
is sufficiently large (>= 50 rows), bg_X
is derived as a random sample of bg_n = 200
rows from X
. If X
has less than bg_n
rows, then simply
bg_X = X
. If X
has too few rows (< 50), you will have to pass an explicit bg_X
.
Minor changes
ranger()
survival models now also work out-of-the-box without passing a tailored prediction function. Use the new argumentsurvival = "chf"
inkernelshap()
andpermshap()
to distinguish cumulative hazards (default) and survival probabilities per time point.- The resulting object of
kernelshap()
andpermshap()
now containbg_X
andbg_w
used to calculate the SHAP values.
CRAN release 0.6.0
This release is intended to be the last before stable version 1.0.0.
Major changes
- Factor-valued predictions are not supported anymore.
Maintenance
- Fix CRAN note about unavailable link to
gam::gam()
. - Added dependency to {MASS} for calculating Moore-Penrose generalized matrix inverse.
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.
CRAN release 0.4.1
Performance improvements
- Significant speed-up for pure data.frames, i.e., no data.tables or tibbles.
- Some small performance improvements, e.g., for factor predictions and univariate predictions.
- Slight speed-up of
permshap()
by caching calculations for the two special permutations of all 0 and all 1. Consequently, them_exact
component in the output is reduced by 2.
Documentation
- Rewrote many examples in the README.
- Added reference to Erik Strumbelj and Ivan Kononeko (2014).
CRAN release 0.4.0
Major changes
- Added
permshap()
to calculate exact permutation SHAP values. The function currently works for up to 14 features. - Factor-valued predictions are now supported. Each level is represented by its dummy variable.
Other changes
- Slight speed-up.
- Integer valued case weights are now turned into doubles to avoid integer overflow.
CRAN release 0.3.8
API improvements
- Multi-output case: column names of predictions are now used as list names of the resulting
S
andSE
lists.
Bug fixes
- {mlr3} probabilistic classification would not work out-of-the-box. This has been fixed (with corresponding example in the README) in #100
- The progress bar was initialized at 1 instead of 0. This is fixed.
Maintenance
- Added explanation of sampling Kernel SHAP to help file.
- In internal calculations, use explicit
feature_names
as dimnames (#96).
CRAN release 0.3.7
Maintenance
- Fixed problem in Latex math for MacOS.
CRAN release 0.3.6
Maintenance
- Improved help files and README
CRAN release 0.3.5
kernelshap 0.3.5
Maintenance
- New contributor: Przemyslaw Biecek - welcome on board!
- My new cozy home: https://github.com/ModelOriented/kernelshap
- Webpage created with "pkgdown"
- Introduced Github workflows
- More unit tests
Small visible changes
- Removed the
ks_extract()
function. It was designed to extract objects like the matrixS
of SHAP values from the resulting "kernelshap" objectx
. We feel that the standard extraction options (x$S
,x[["S"]]
, orgetElement(x, "S")
) are sufficient. - Adding
$(n \times K)$ matrix of predictions to the output, where$n$ is the number of rows in the explainer dataX
, and$K$ is the dimension of a single prediction (usually 1). - Setting
verbose = FALSE
now does not suppress the warning on too large background data anymore. UsesuppressWarnings()
instead.
CRAN release 0.3.4
What's Changed
Documentation update
- New logo
- Better package description
- Better README