Skip to content

Releases: ModelOriented/kernelshap

CRAN release 0.7.0

17 Aug 16:38
29f0de1
Compare
Choose a tag to compare

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 argument survival = "chf" in kernelshap() and permshap() to distinguish cumulative hazards (default) and survival probabilities per time point.
  • The resulting object of kernelshap() and permshap() now contain bg_X and bg_w used to calculate the SHAP values.

CRAN release 0.6.0

13 Jul 07:27
435fa43
Compare
Choose a tag to compare

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

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