Skip to content

Releases: ModelOriented/kernelshap

CRAN release 0.5.0

29 May 21:19
9808196
Compare
Choose a tag to compare

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() (and additive_shap()) got an element "algorithm".
  • is.permshap() has been removed.

CRAN release 0.4.1

03 Dec 15:42
70e0c68
Compare
Choose a tag to compare

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, the m_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

10 Nov 20:30
a9456f4
Compare
Choose a tag to compare

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

24 Sep 14:59
2a6fd0c
Compare
Choose a tag to compare

API improvements

  • Multi-output case: column names of predictions are now used as list names of the resulting S and SE 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

17 May 07:53
349db09
Compare
Choose a tag to compare

Maintenance

  • Fixed problem in Latex math for MacOS.

CRAN release 0.3.6

03 May 18:56
1f3158e
Compare
Choose a tag to compare

Maintenance

  • Improved help files and README

CRAN release 0.3.5

31 Mar 18:38
a131854
Compare
Choose a tag to compare

kernelshap 0.3.5

Maintenance

Small visible changes

  • Removed the ks_extract() function. It was designed to extract objects like the matrix S of SHAP values from the resulting "kernelshap" object x. We feel that the standard extraction options (x$S, x[["S"]], or getElement(x, "S")) are sufficient.
  • Adding $(n \times K)$ matrix of predictions to the output, where $n$ is the number of rows in the explainer data X, 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. Use suppressWarnings() instead.

CRAN release 0.3.4

26 Feb 09:02
32d490f
Compare
Choose a tag to compare

What's Changed

Documentation update

  • New logo
  • Better package description
  • Better README

CRAN release 0.3.3

11 Jan 17:40
fde13bf
Compare
Choose a tag to compare

kernelshap 0.3.3

Less dependencies

  • Removed dependency "dorng". This might have an impact on the seeding if in parallel mode.
  • Removed dependency "MASS"

CRAN release 0.3.2

17 Dec 10:03
5722446
Compare
Choose a tag to compare

kernelshap 0.3.2

Documentation

  • Rewritten README and examples to better show the role of the background data.

Bug fixes

  • When bg_X contained more columns than X, unflexible prediction functions could fail when being applied to bg_X.