Recent Releases of shap
shap - v0.48.0
What's Changed
Added
- Add CoalitionExplainer and add possibility of using Winter Values in Partition Explainer by @CousinThrockmorton in https://github.com/shap/shap/pull/3666
- Support and test against Python 3.13 by @connortann in https://github.com/shap/shap/pull/3861 and @CloseChoice in https://github.com/shap/shap/pull/4104
- Add Support for PyTorch
IdentityLayer by @RoyiAvital in https://github.com/shap/shap/pull/4028 ### Documentation Update Explaining a model that uses standardized features by @randombenj in https://github.com/shap/shap/pull/3903
Other Changes
Changed alias by @Ja-Tink in https://github.com/shap/shap/pull/4049
update javascript packages by @CloseChoice in https://github.com/shap/shap/pull/4067
Fixed visual bug for small SHAP values by @Ja-Tink in https://github.com/shap/shap/pull/4053
Fix summary_plot displays only one feature 4081 by @CloseChoice in https://github.com/shap/shap/pull/4087
resolve threading warnings of regex library by @emmanuel-ferdman in https://github.com/shap/shap/pull/4084
New Contributors
- @RoyiAvital made their first contribution in https://github.com/shap/shap/pull/4028
- @Ja-Tink made their first contribution in https://github.com/shap/shap/pull/4049
- @emmanuel-ferdman made their first contribution in https://github.com/shap/shap/pull/4084
- @randombenj made their first contribution in https://github.com/shap/shap/pull/3903
- @CousinThrockmorton made their first contribution in https://github.com/shap/shap/pull/3666
Full Changelog: https://github.com/shap/shap/compare/v0.47.2...v0.48.0
- Jupyter Notebook
Published by CloseChoice 12 months ago
shap - CausalML support and fix ForceVisualizer regression
What's Changed
Added
- Add experimental causalml support by @alexander-pv in https://github.com/shap/shap/pull/3273
Other Changes
- DOCS: clarity for partition tree explanation in
Simple California Demo.ipynbby @ethanknights in https://github.com/shap/shap/pull/4027 - FIX: unique value jitter by @fabianliebig in https://github.com/shap/shap/pull/4041
- FIX: fix neutral language in SHAP value description by @Hrafz in https://github.com/shap/shap/pull/4058
- FIX regression test for javascript plotting compontents and add tests by @CloseChoice in https://github.com/shap/shap/pull/4060
New Contributors
- @ethanknights made their first contribution in https://github.com/shap/shap/pull/4027
- @Hrafz made their first contribution in https://github.com/shap/shap/pull/4058
Full Changelog: https://github.com/shap/shap/compare/v0.47.1...v0.47.2
- Jupyter Notebook
Published by CloseChoice about 1 year ago
shap - v0.47.1
Fixes
- Fix regression in summary violin plot by @CloseChoice in https://github.com/shap/shap/pull/4033
- Fix incorrect SHAP Values for Missing Data in new scikit versions for Tree Models by @sunruslan in https://github.com/shap/shap/pull/3998
- Fix issue with tight tolerances when calling check_additivity by @adamwitmer in https://github.com/shap/shap/pull/3993
- Fix AttributeError when extracting colors by @fabianliebig in https://github.com/shap/shap/pull/4017
- Fix additivity check failure uint32 overflow by @arhall0 in https://github.com/shap/shap/pull/4006
New Contributors
- @adamwitmer made their first contribution in https://github.com/shap/shap/pull/3993
- @fabianliebig made their first contribution in https://github.com/shap/shap/pull/4017
- @sunruslan made their first contribution in https://github.com/shap/shap/pull/3998
- @arhall0 made their first contribution in https://github.com/shap/shap/pull/4006
Full Changelog: https://github.com/shap/shap/compare/v0.47.0...v0.47.1
- Jupyter Notebook
Published by CloseChoice about 1 year ago
shap - v0.47.0
What's Changed
Breaking changes
- Add deprecation warning to legacy bar plot, add migration guide to new Explainer API by @connortann in https://github.com/shap/shap/pull/3739 ### Added
- Added categorical support for shap.plots.scatter by @hypostulate in https://github.com/shap/shap/pull/3706
- Introduce vmax parameter in image plot by @sd3ntato in https://github.com/shap/shap/pull/2848
- New plotting API for beeswarm to accept and return axes by @chriscave in https://github.com/shap/shap/pull/3561
- Enabeling to create a beeswarm figure without sum of other features by @kalkairis in https://github.com/shap/shap/pull/2225
- New interface to customise visualisations by @connortann in https://github.com/shap/shap/pull/3788
- Allow custom styles for bar plot by @connortann in https://github.com/shap/shap/pull/3849
- TreeExplainer numerical sensitivity by @tylerjereddy in https://github.com/shap/shap/pull/3990
- Faster non-tree KernelExplainer by @tylerjereddy in https://github.com/shap/shap/pull/3944 ### Fixed
- Fix logit errors in KernelExplainer by @CloseChoice in https://github.com/shap/shap/pull/3917
- Fix TypeError in summary_plot by @bedapisl in https://github.com/shap/shap/pull/3738
- Re-vendor colorconv from skimage 0.24.0 by @connortann in https://github.com/shap/shap/pull/3785
- Fix label option for multiple rows in shap.plots.image by @SFatemehM in https://github.com/shap/shap/pull/3636
- Fix transformers by @costrau in https://github.com/shap/shap/pull/3578
- Fix OpChain repr for kwargs-only operations by @thatlittleboy in https://github.com/shap/shap/pull/3838
- Fix the wrong figure for multiclass in summary plot by @46319943 in https://github.com/shap/shap/pull/3836
- Fix summary plot issue for multiclass case by @CloseChoice in https://github.com/shap/shap/pull/3925
- Fix colormaps by @CloseChoice in https://github.com/shap/shap/pull/3909 ### Documentation
- Fixed error in documentation of shap.datasets.communitiesandcrime by @TommyGiak in https://github.com/shap/shap/pull/3846
- Fix column indices in Understanding Tree SHAP notebook by @operte in https://github.com/shap/shap/pull/3749
- Reformat the scatter notebook in API example by @Xovee in https://github.com/shap/shap/pull/3752
- Improved typing and docs for scatter plot by @connortann in https://github.com/shap/shap/pull/3811
- Use intersphinx for some external links by @thatlittleboy in https://github.com/shap/shap/pull/3851
- Pin docs dependencies for reproducibility by @connortann in https://github.com/shap/shap/pull/3885
- Fix typo in force plot with LightGBM and description by @davidefiocco in https://github.com/shap/shap/pull/3962
- Fix: fixed markdown issue with some sections title in the introductio… by @CSantos01 in https://github.com/shap/shap/pull/3957
- Fix comment for beeswarm plot in intro notebook by @davidefiocco in https://github.com/shap/shap/pull/3960 ### Maintenance
- Fix: explicitly set matplotlib interpolation rcParams in tests by @connortann in https://github.com/shap/shap/pull/3953 ### Other Changes
- Skip sentiment analysis test on MacOS runners by @connortann in https://github.com/shap/shap/pull/3955
- Remove deprecated unused code
_build_delta_masked_inputsandExplainer._compute_main_effectsby @connortann in https://github.com/shap/shap/pull/3856 - Improve handling of the
approximateparameter to TreeExplainer for consistency, and deprecate the argument in the explainer's init method by @CloseChoice in https://github.com/shap/shap/pull/3834 - Refactor feature_perturbation in Tree explainers by @glemaitre in https://github.com/shap/shap/pull/2624
- Test decision plot by @CloseChoice in https://github.com/shap/shap/pull/3720
- Bump ruff, fix rule E721 by @connortann in https://github.com/shap/shap/pull/3751
- Refactor plot utils and colors by @thatlittleboy in https://github.com/shap/shap/pull/3833
- Refactor and optimize explanation ops by @thatlittleboy in https://github.com/shap/shap/pull/3850
- Fix CI feedstock build by @CloseChoice in https://github.com/shap/shap/pull/3862
- Add error to multi output cohort call by @CloseChoice in https://github.com/shap/shap/pull/3870
- Fix typo in beeswarm.ipynb by @kamurani in https://github.com/shap/shap/pull/3900
- DeepExplainer docstring improvements by @anitagraser in https://github.com/shap/shap/pull/3892
- Clear plot before generating new summary plots to avoid overlapping color bars by @chun61205 in https://github.com/shap/shap/pull/3921
- Support rng for summary_plot by @tylerjereddy in https://github.com/shap/shap/pull/3945
- Minor speedups in non-tree KernelExplainer by @tylerjereddy in https://github.com/shap/shap/pull/3983
New Contributors
- @bedapisl made their first contribution in https://github.com/shap/shap/pull/3738
- @operte made their first contribution in https://github.com/shap/shap/pull/3749
- @Xovee made their first contribution in https://github.com/shap/shap/pull/3752
- @hypostulate made their first contribution in https://github.com/shap/shap/pull/3706
- @SFatemehM made their first contribution in https://github.com/shap/shap/pull/3636
- @sd3ntato made their first contribution in https://github.com/shap/shap/pull/2848
- @chriscave made their first contribution in https://github.com/shap/shap/pull/3561
- @kalkairis made their first contribution in https://github.com/shap/shap/pull/2225
- @TommyGiak made their first contribution in https://github.com/shap/shap/pull/3846
- @46319943 made their first contribution in https://github.com/shap/shap/pull/3836
- @kamurani made their first contribution in https://github.com/shap/shap/pull/3900
- @anitagraser made their first contribution in https://github.com/shap/shap/pull/3892
- @chun61205 made their first contribution in https://github.com/shap/shap/pull/3921
- @davidefiocco made their first contribution in https://github.com/shap/shap/pull/3962
- @CSantos01 made their first contribution in https://github.com/shap/shap/pull/3957
- @Fredheda made their first contribution in https://github.com/shap/shap/pull/3984
- @tylerjereddy made their first contribution in https://github.com/shap/shap/pull/3945
Full Changelog: https://github.com/shap/shap/compare/v0.46.0...v0.47.0
- Jupyter Notebook
Published by CloseChoice about 1 year ago
shap - v0.46.0
What's Changed
This release adds compatibility with recent version of numpy and tensorflow, and includes several bug fixes.
Added
- Added support for numpy 2, by @connortann in https://github.com/shap/shap/pull/3717 and @paulbkoch in https://github.com/shap/shap/pull/3704
- Added support for keras 3 and tensorflow 2.16 by @CloseChoice in https://github.com/shap/shap/pull/3677
Changed
- Removed the deprecated
auto_size_plotparameter toshap.summary_plot().
Fixed
- Fixed issue explaining models trained with
float16mixed precision by @CloseChoice in https://github.com/shap/shap/pull/3652 - Fixed deserialization bug with
XGBRegressormodels by @CloseChoice in https://github.com/shap/shap/pull/3669
Plus several further documentation and code quality improvements.
New Contributors
- @LetiP made their first contribution in https://github.com/shap/shap/pull/3685
- @paulbkoch made their first contribution in https://github.com/shap/shap/pull/3704
Full Changelog: https://github.com/shap/shap/compare/v0.45.1...v0.46.0
- Jupyter Notebook
Published by connortann almost 2 years ago
shap - v0.45.1
This is a patch release with a couple of bug fixes. In particular, fixes a bug relating to loading of XGBoost models with exponential losses.
What's Changed
Added
- Added selu activation for pytorch deep explainer by @CloseChoice in https://github.com/shap/shap/pull/3617
- Added "ax" option to heatmap plotting function by @sroener in https://github.com/shap/shap/pull/3571 ### Changed
- Removed unused "display" parameters from dataset functions by @LakshmanKishore in https://github.com/shap/shap/pull/3543 ### Fixed
- Fixed loading of XGBoost models with expeonential lossesby @CloseChoice in https://github.com/shap/shap/pull/3616
- Fixed call interface for the deep explainer by @CloseChoice in https://github.com/shap/shap/pull/3558
- Fixed use of Falcon language model for text generation by @CloseChoice in https://github.com/shap/shap/pull/3592
- Fixed lightgbm compilation (macOS Workflow) by @bewygs in https://github.com/shap/shap/pull/3632
- Fixed loading of XGBoost models with exponential losses by @CloseChoice in https://github.com/shap/shap/pull/3616
Plus several documentation and maintenance updates by @bewygs , @CloseChoice , @Hugh-OBrien
New Contributors
- @sroener made their first contribution in https://github.com/shap/shap/pull/3571
- @Hugh-OBrien made their first contribution in https://github.com/shap/shap/pull/3604
- @bewygs made their first contribution in https://github.com/shap/shap/pull/3632
Full Changelog: https://github.com/shap/shap/compare/v0.45.0...v0.45.1
- Jupyter Notebook
Published by connortann about 2 years ago
shap - v0.45.0
This is a fairly significant release containing a number of breaking changes.
Thank you to a number of new contributors for their contributions to this release! We are eager to grow the pool of maintainers, so please do get in touch on #3559 if you are interested in being part of the team.
What's Changed
Breaking changes
- Dropped support for 3.8 in https://github.com/shap/shap/pull/3414
- Changed type and shape of returned SHAP values in some cases, to be consistent with model outputs. SHAP values for models with multiple outputs are now np.ndarray rather than list, by @CloseChoice in https://github.com/shap/shap/pull/3318
- Removed deprecated
feature_dependenceparameters in TreeExplainer and LinearExplainer by @thatlittleboy in https://github.com/shap/shap/pull/3340 - Removed deprecated alias for Coefficient by @connortann in https://github.com/shap/shap/pull/3511
Added
- Added support for python 3.12 by @connortann in https://github.com/shap/shap/pull/3414
- Added support for GPU build on recent CUDA versions by @trivialfis in https://github.com/shap/shap/pull/3462
- 2x import time speedup via lazy importing of pytorch by @connortann in https://github.com/shap/shap/pull/3533
- Added support returning the matplotlib figure in bar plots by @richarddli in https://github.com/shap/shap/pull/3494
- Added selu activation for tensorflow deep explainer by @CloseChoice in https://github.com/shap/shap/pull/3504
- Added support for special characters in catboost models by @CloseChoice in https://github.com/shap/shap/pull/3506
- Added ability to control marker size in
beeswarmplots by @MonoHue in https://github.com/shap/shap/pull/3530
Fixed
- Fixed XGBoost model load by @trivialfis in https://github.com/shap/shap/pull/3462
- Fixed text masking with certain tokenizers by @costrau in https://github.com/shap/shap/pull/3536
- Fixed issue with KernelExplainer when explaining tensorflow models by @connortann in https://github.com/shap/shap/pull/3542
- Fixed force_plot contribution threshold for negative contributions by @connortann in https://github.com/shap/shap/pull/3547
- Removed overwrite of default warning filter or formatter by @connortann in https://github.com/shap/shap/pull/3514
.. plus a large number of documentation, testing and other maintenance updates by @CloseChoice , @yuanx749 , @LakshmanKishore and others.
New Contributors
- @richarddli made their first contribution in https://github.com/shap/shap/pull/3494
- @yuanx749 made their first contribution in https://github.com/shap/shap/pull/3458
- @LakshmanKishore made their first contribution in https://github.com/shap/shap/pull/3393
- @trivialfis made their first contribution in https://github.com/shap/shap/pull/3462
- @DanGolding made their first contribution in https://github.com/shap/shap/pull/3526
- @MonoHue made their first contribution in https://github.com/shap/shap/pull/3530
- @costrau made their first contribution in https://github.com/shap/shap/pull/3536
Full Changelog: https://github.com/shap/shap/compare/v0.44.1...v0.45.0
- Jupyter Notebook
Published by connortann about 2 years ago
shap - v0.44.1
Patch release to fix an issue with the display of force plots.
Fixed
- Fixed HTML issue affecting display of force plots by @CloseChoice in https://github.com/shap/shap/pull/3464
- Fixed calculation of interactions values for catboost regressors by @CloseChoice in https://github.com/shap/shap/pull/3459
- Update XGBoost parsing to use ubjson format, replacing deprecated binary format by @CloseChoice in https://github.com/shap/shap/pull/3345 ### Other
- Further improvements to documentation
Full Changelog: https://github.com/shap/shap/compare/v0.44.0...v0.44.1
- Jupyter Notebook
Published by connortann over 2 years ago
shap - v0.44.0
This release contains a number enhancements and bug fixes.
What's Changed
Added
- Faster and more stable linear solver in KernelShap by @lorentzenchr in https://github.com/shap/shap/pull/3271
- Enabled passing of
axtogroup_difference()plot by @mtlulka in https://github.com/shap/shap/pull/3355 - Added support for Explanation.display_data in bar plot by @fountaindive in https://github.com/shap/shap/pull/3386
- Improved build messages when building from source by @connortann in https://github.com/shap/shap/pull/3403
Fixed
- Fixed
CatboostClassifierexplanations with feature interactions on Windows by @CloseChoice in https://github.com/shap/shap/pull/3325 - Fixed passing of Xgboost model parameters to xgboost.DMatrix by @vancromy in https://github.com/shap/shap/pull/3314
- Explicit specification of xgboost>=1.4 constraint by @mtlulka in https://github.com/shap/shap/pull/3352
- Fixed conversion of DMatrix to CSR matrix by @thatlittleboy in https://github.com/shap/shap/pull/3359
- Removed deprecated
use_line_collectionindependence_plotby @CloseChoice in https://github.com/shap/shap/pull/3369 - Fixed bug relating to array reshaping in
scatterplots by @SomeUserName1 in https://github.com/shap/shap/pull/2799
Documentation
- A large number of example notebooks fixed and updated by @connortann, @znacer , @thatlittleboy, @CloseChoice and @stompsjo
New Contributors
- @vancromy made their first contribution in https://github.com/shap/shap/pull/3314
- @lorentzenchr made their first contribution in https://github.com/shap/shap/pull/3271
- @mtlulka made their first contribution in https://github.com/shap/shap/pull/3352
- @fountaindive made their first contribution in https://github.com/shap/shap/pull/3386
- @SomeUserName1 made their first contribution in https://github.com/shap/shap/pull/2799
- @stompsjo made their first contribution in https://github.com/shap/shap/pull/3391
Full Changelog: https://github.com/shap/shap/compare/v0.43.0...V0.44.0
- Jupyter Notebook
Published by connortann over 2 years ago
shap - v0.43.0
What's Changed
This release contains a number of bug fixes and improvements.
Following the NEP 29 deprecation policy, this release drops support for python 3.7 and will be the last major release to support python 3.8.
Breaking changes
- Removed the deprecated Boston dataset by @thatlittleboy in https://github.com/shap/shap/pull/3316
- The shape of
Explanation.base_valueshas been standardised between different TreeExplainer models to always be of shape(N,)and not(N,1). By @thatlittleboy in https://github.com/shap/shap/pull/3121
Added
- Added additivity check to Pytorch DeepExplainer (activated by default) by @noxthot in https://github.com/shap/shap/pull/3265
- Added flag to allow the printing of the mean SHAP value in the legend of a multi-output bar plot. By @101AlexMartin in https://github.com/shap/shap/pull/3062
- Added heatmap and violin plot to top-level API by @connortann in https://github.com/shap/shap/pull/3157
- Replaced all tqdm imports with tqdm.auto by @owenlamont in https://github.com/shap/shap/pull/3199
Fixed
- Fixed segmentation faults on MacOS with lightgbm tests (with newer libomp versions) by @thatlittleboy in https://github.com/shap/shap/pull/3093
- Support LightGBM ensemble containing single leaf trees (stump) by @thatlittleboy in https://github.com/shap/shap/pull/3094
- Fixed conversion DataFrame to ndarray for Explanation.data by @danieleongari in https://github.com/shap/shap/pull/3131
- Fixed waterfall plot on explanations of sklearn tree models by @connortann in https://github.com/shap/shap/pull/3138
- Fixed pandas input for gradient explainer by @Koen-Git in https://github.com/shap/shap/pull/3153
- Fixed slicing of
feature_namesin Explanation objects with square.valuesby @thatlittleboy in https://github.com/shap/shap/pull/3126 - Correct xlim in force_matplotlib in cases where the signs of force are all the same by @zaburo-ch in https://github.com/shap/shap/pull/2839
- Fixed ngboost explanations when col_sample < 1 by @CloseChoice in https://github.com/shap/shap/pull/3294
- Fixed torch additivity check in PyTorch DeepExplainer by @noxthot in https://github.com/shap/shap/pull/3281
- Replaced print statements with warnings in DeepExplainer by @znacer in https://github.com/shap/shap/pull/3264
- Replace deprecated
register_backward_hook()by @noxthot in https://github.com/shap/shap/pull/3259 - Fixed deprecated use of xgboost earlystoppingrounds by @CloseChoice in https://github.com/shap/shap/pull/3306
- Fixed 3rd party deprecation warnings: numba, xgboost, typing, distutils by @connortann in https://github.com/shap/shap/pull/3084
- Updated the Javascript bundle to update deprecated dependencies by @connortann in https://github.com/shap/shap/pull/2974
There have also been a large number of improvements to the tutorials and examples, by @connortann, @znacer, @arshiaar, @thatlittleboy, @dsgibbons, @owenlamont and @CloseChoice
New Contributors
- @101AlexMartin made their first contribution in https://github.com/shap/shap/pull/3062
- @znacer made their first contribution in https://github.com/shap/shap/pull/3112
- @danieleongari made their first contribution in https://github.com/shap/shap/pull/3131
- @Koen-Git made their first contribution in https://github.com/shap/shap/pull/3153
- @pre-commit-ci made their first contribution in https://github.com/shap/shap/pull/3173
- @owenlamont made their first contribution in https://github.com/shap/shap/pull/3199
- @arshiaar made their first contribution in https://github.com/shap/shap/pull/3201
- @dsgibbons made their first contribution in https://github.com/shap/shap/pull/3200
- @noxthot made their first contribution in https://github.com/shap/shap/pull/3265
- @zaburo-ch made their first contribution in https://github.com/shap/shap/pull/2839
- @CloseChoice made their first contribution in https://github.com/shap/shap/pull/3282
Full Changelog: https://github.com/shap/shap/compare/v0.42.1...v0.43.0
- Jupyter Notebook
Published by connortann over 2 years ago
shap - v0.42.1
Patch release to provide wheels for a broader range of architectures.
Added
- Added wheels for linux:aarch64 and macos:arm64 by @PrimozGodec in https://github.com/slundberg/shap/pull/3078 and @connortann in https://github.com/slundberg/shap/pull/3083.
Fixed
- Fixed circular import issues with shap.benchmark by @thatlittleboy in https://github.com/slundberg/shap/pull/3076.
- Fixed TestPyPI releases workflow by @connortann in https://github.com/slundberg/shap/pull/3068
- Fix further flaky tests by @thatlittleboy in https://github.com/slundberg/shap/pull/3073
- Fix shap.summary_plot to work with matplotlib 3.6.0 by @jklaise in https://github.com/slundberg/shap/pull/2697
- Fix benchmark top-level import by @thatlittleboy in https://github.com/slundberg/shap/pull/3076
- Fix ipython import warning from top-level shap import by @connortann in https://github.com/slundberg/shap/pull/3090
Full Changelog: https://github.com/slundberg/shap/compare/v0.42.0...v0.42.1
- Jupyter Notebook
Published by connortann almost 3 years ago
shap - v0.42.0
This release incorporates many changes that were originally contributed by the SHAP community via @dsgibbons's Community Fork, which has now been merged into the main shap repository. PRs from this origin are labelled here as fork#123.
This will be the last release that supports python 3.7.
Added
- Added support for python 3.11 (fork#72 by @connortann).
- Added
n_pointsparameter to all functions inshap.datasets(fork#39 by @thatlittleboy). - Added
__call__toKernelExplainer(#2966 by @dwolfeu). - Added contributing guidelines (#2996 by @connortann).
Fixed
- Fixed
plot.waterfallto support yticklabels with boolean features (fork#58 by @dwolfeu). - Prevent
TreeExplainer.__call__from throwing ValueError when passed a pandas DataFrame containing Categorical columns (fork#88 by @thatlittleboy). - Fixed sampling in
shap.datasetsto sample without replacement (fork#36 by @thatlittleboy). - Fixed an
UnboundLocalErrorproblem arising from passing a dictionary input toshap.plots.bar(#3001 by @thatlittleboy). - Fixed tensorflow import issue with Pyspark when using
Gradient(#2983 by @skamdar). - Fixed the aspect ratio of the colorbar in
shap.plots.heatmap, and use theaxmatplotlib API internally for plotting (#3040 by @thatlittleboy). - Fixed deprecation warnings for
numba>=0.44(fork#9 and fork#68 by @connortann). - Fixed deprecation warnings for
numpy>=1.24from numpy types (fork#7 by @dsgibbons). - Fixed deprecation warnings for
Ipython>=8fromIpython.core.display(fork#13 by @thatlittleboy). - Fixed deprecation warnings for
tensorflow>=2.11fromtf.optimisers(fork#16 by @simonangerbauer). - Fixed deprecation warnings for
sklearn>=1.2fromsklearn.linear_model(fork#22 by @dsgibbons). - Fixed deprecation warnings for
xgboost>=1.4fromntree_limitin tree explainer (#2987 by @adnene-guessoum). - Fixed build on Windows and MacOS (#3015 by @PrimozGodec; #3028, #3029 and #3031 by @connortann).
- Fixed creation of ragged arrays in
shap.explainers.Exact(#3064 by @connortann).
Changed
Removed
- Deprecated the Boston house price dataset (fork#38 by @thatlittleboy).
- Removed the unused
mimic.pyfile andMimicExplainercode (fork#53 by @thatlittleboy).
Maintenance
- Fixed failing unit tests (fork#29 by @dsgibbons, fork#20 by @simonangerbauer, #3044 and fork#24 by @connortann).
- Include CUDA GPU C extension files in the source distribution (#3009 by @jklaise).
- Fixed installation of package via setuptools (fork#51 by @thatlittleboy).
- Introduced a minimal set of
rufflinting (fork#25, fork#26, fork#27, #2973, #2972 and #2976 by @connortann; #2968, #2986 by @thatlittleboy). - Updated project metadata to PEP 517 (#3022 by @connortann).
- Introduced more thorough testing on CI against newer dependencies (fork#61 and #3017 by @connortann)
- Reduced unit test time by ~5 mins (#3046 by @connortann).
- Introduced fixtures for reproducible fuzz testing (#3048 by @connortann).
- Jupyter Notebook
Published by connortann almost 3 years ago
shap - v0.41.0
Lots of bugs fixes and API improvements.
- Fixed rare bug with XGBoost model loading by @TheZL @lrjball
- Fixed the beeswarm plot so it does not modify the passed explanation object, @ravwojdyla
- Automatic wheel building using GH actions by @quantumtec
- GC collection for memory in KernelExplainer by @Qingtian-Zou
- Fixed max_evals params for PartitionExplainer
- JIT optimize the PartitionExplainer
- Fix colorbar formatting issues @SleepyPepperHead
- New benchmark notebooks
- Use display_data for plotting when possible @yuuuxt
- Improved GPUTreeShap compilation and params @RAMitchell
- Fix TF API change in DeepExplainer @filusn
- Add torch tensor support for plots @alexander-pv
- Switch to Github actions for testing instead of Travis
- New California demo dataset @swalsh1123
- Fix waterfall plot bug @RichardScottOZ
- Handle missing matplotlib installation @klieret
- Add linearize link support for Additive explainer (Nandish Gupta)
- Fix exceptions to be more specific @alexisdrakopoulos @collinb9
- Add color map option for plotting @tlabarta
- Release fixed numpy version requirement @rmehyde
- And many other contributions kindly made by @WeichenXu123 @imatiach-msft @zeshengli @nkthiebaut @songololo @GiovannaNicora @joshzwiebel @Ashishbodla @navdeep-G @smathewmanuel @ycouble @anubhavmaity @adityasaini70 @ngupta20 @jckkvs @abs428 @JulesCollenne @Tiagosf00 @javirandor and @Thuener
- Jupyter Notebook
Published by slundberg almost 4 years ago
shap - v0.40.0
This release contains many bugs fixes and lots of new functionality, specifically for transformer based NLP models. Some highlights include: - New plots, bug fixes, docs, and features for NLP model explanations (see docs for details). - important permutation explainer performance fix by @sander-sn - New joint scatter plots to plot many at once on the same y-scale - better tree model memory usage by @morriskurz - new docs by @coryroyce - new wheel building by @PrimozGodec - dark mode improvements for the docs by @gialmisi - api tweaks by @c56pony @nsorros @jebarb
- Jupyter Notebook
Published by slundberg over 4 years ago
shap - v0.38.0
This release contains improved support for explanations of transformer text models and support for the new Explanation object based API. Specific improvements include:
- Transformer model support in the Text explainer courtesy of @ryserrao
- Interventional Tree explainer GPU support courtesy of @RAMitchell
- Image captioning model support courtesy of @anusham1990
- Benchmarking improvements courtesy of @maggiewu19
- New text and image visualizations courtesy of @vivekchettiar
- New explainer serialization support courtesy of @vivekchettiar
- Bug fixes for Linear explainer and the new API courtesy of @heimengqi
- Fix for categorical plots courtesy of @jeffreyftang
- CUDA support improvements courtesy of @JohnZed
- Support for econML model courtesy of @vasilismsr
- Many other bug fixes and API improvements.
- Jupyter Notebook
Published by slundberg over 5 years ago
shap - v0.37.0
This release contains more support for the new API, many bug fixes, and preliminary model agnostic text/image explainer support (still beta). Specific contributions include:
- Fix Sampling explainer sample counting issue courtesy of @tcbegley
- Add multi-bar plotting support.
- Preliminary support for cohorts.
- Fixed an import error courtesy of @suragnair
- Fix Tree explainer issues with isolation forests with max_features < 1 courtesy of @zhanjiezhu
- Huge documentation cleanup and update courtesy of @lrjball
- Typo fix courtesy of @anusham1990
- Added a documentation notebook for the Exact explainer.
- Text and Image explainers courtesy of @anusham1990 and Ryan Serrao
- Bug fix for shap.utils.hclust
- Initial support for InterpretML EBM models.
- Added column grouping functionality to Explainer objects.
- Fix for loop index bug in Deep explainer for PyTorch courtesy of @quentinRaq
- Initial text to text visualization concepts courtesy of @vivekchettiar
- Color conversion warning fix courtesy of @wangjoshuah
- Fix invertibility issues in Kernel explainer with the pseudoinverse courtesy of @PrimozGodec
- New benchmark code courtesy of @maggiewu19 and @vivekchettiar
- Other small bug fixes and enhancements.
- Jupyter Notebook
Published by slundberg over 5 years ago
shap - v0.36.0
This version contains a significant refactoring of the SHAP code base into a new (cleaner) API. Full backwards compatibility should be retained, but most things are now available in locations with the new API. Note that this API is still in a beta form, so refrain from depending on it for production code until the next release. Highlights include:
- A new shap.Explainer object that auto-chooses the explainer based on the given model and masking dataset.
- A new shap.Explanation object that allows for parallel slicing of data, SHAP values, base values (expected values), and other explanation-specific elements.
- A new shap.maskers.* module that separates the various ways to mask (i.e. perturb/hide) features from the algorithms themselves.
- A new shap.explainers.Partition explainer that can explain any text or image models very quickly.
- A new shap.maskers.Partition masker that ensures tightly grouped features are perturbed in unison, so preventing "unrealistic" model inputs from inappropriately influencing the model prediction. It also allows for the exact quadratic time computation of SHAP values for the 'structured games' (with coalitions structured according to a hierarchical clustering).
- A new shap.plots.* module with revamped plot types that all support the new API. Plots are now named more directly, so summary_plot (default) becomes beeswarm, and dependent_plot becomes scatter. Not all the plots have been ported over to the new API, but most have.
- A new notebooks/plots/* directory given examples of how to use the new plotting functions.
- A new shap.plots.bar function to directly create bar plots and also display hierarchical clustering structures to group redundant features together, and show the structure used by a Partition explainer (that relied on Owen values, which are an extension of Shapley values).
- Equally check fixes courtesy of @jameslamb
- Sparse kmeans support courtesy of @PrimozGodec
- Pytorch bug fixes courtesy of @rightx2
- NPM JS code clean up courtesy of @SachinVarghese
- Fix logit force plot bug courtesy of @ehuijzer
- Decision plot documentation updates courtesy of @floidgilbert
- sklearn GBM fix courtesy of @ChemEngDataSci
- XGBoost 1.1 fix courtesy of @lrjball
- Make SHAP spark serializable courtesy of @QuentinAmbard
- Custom summary plot color maps courtesy of @nasir-bhanpuri
- Support string inputs for KernelSHAP courtesy of @YotamElor
- Doc fixes courtesy of @imatiach-msft
- Support for GPBoost courtesy of @fabsig
- Import bug fix courtesy of @gracecarrillo and @aokeson
- Jupyter Notebook
Published by slundberg almost 6 years ago
shap - 0.35.0
This release includes:
- Better support for TensorFlow 2 (thanks @imatiach-msft)
- Support for NGBoost models in TreeExplainer (thanks @zhiruiwang)
- TreeExplainer support for the new sklearn.ensemble.HistGradientBoosting model.
- New improved versions of PartitionExplainer for images and text.
- IBM zOS compatibility courtesy of @DorianCzichotzki.
- Support for XGBoost 1.0
- Many bug fixes courtesy of Ivan, Christian Paul, @RandallJEllis, and @ibuda.
- Jupyter Notebook
Published by slundberg over 6 years ago
shap - 0.34.0
This release includes: - Many small bug fixes. - Better matplotlib text alignment during rotation courtesy of @koomie - Cleaned up the C++ transformer code to allow easier PRs. - Fixed a too tight checkadditivity tolerance in TreeExplainer #950 - Updated the LinearExplainer API to match TreeExplainer - Allow custom class ordering in a summaryplot courtesy of @SimonStreicher
- Jupyter Notebook
Published by slundberg over 6 years ago
shap - 0.33.0
This release contains various bug fixes and new features including:
- Added PySpark support for TreeExplainer courtesy of @QuentinAmbard
- A new type of plot that is an alternative to the forceplot, a `waterfallplot`
- A new PermutationExplainer that is an alternative to KernelExplainer and SamplingExplainer.
- Added
return_variancesto GradientExplainer for PyTorch courtesy of @s6juncheng - Now we use exceptions rather than assertions in TreeExplainer courtesy of @ssaamm
- Fixed image_plot transpose issue courtesy of @Jimbotsai
- Fix color bar axis attachment issue courtesy of Lasse Valentini Jensen
- Fix tensor attachment issue in PyTorch courtesy of @gabrieltseng
- Fix color clipping ranges in summary_pot courtesy of @joelostblom
- Address sklearn 0.22 API changes courtesy of @lemon-yellow
- Ensure matplotlib is optional courtesy of @imatiach-msft
- Jupyter Notebook
Published by slundberg over 6 years ago
shap - 0.32.0
This release includes: - Support for sklearn isolation forest courtesy of @JiechengZhao - New check_additivity tests to ensure no errors in DeepExplainer and TreeExplainer - Fix #861, #860 - Fix missing readme example html file - Support for spark decision tree regressor courtesy of @QuentinAmbard - Better safe isinstance checking courtesy of @parsatorb - Fix eager execution in TF < 2 courtesy of @bottydim
- Jupyter Notebook
Published by slundberg over 6 years ago
shap - 0.31.0
This release contains several new features and bug fixes: - GradientExplainer now supports TensorFlow 2.0. - We now do a lazy load of the plotting dependencies, which means a pip install no longer needs to also pull in matplotlib, skimage, and ipython. This should make installs much lighter, especially those that don't need plotting :) - Added a new BruteForceExplainer for easy testing and comparison on small problems. - Added a new partialdependenceplot function. This function will be used to illustrate the close connections between partial dependence plots and SHAP values in future example notebooks. - Handle the multiclass case with no intercept in LinearExplainer courtesy of @gabrieltseng - Some extras_require options during the pip install courtesy of @AbdealiJK - Other small bug fixes and updates
- Jupyter Notebook
Published by slundberg over 6 years ago
shap - 0.30.0
- New decision_plot function courtesy of @floidgilbert
- Add alpha version of the new model agnostic PartitionExplainer
- ensure data is all on the same device for pytorch in DeepExplainer courtesy of @gabrieltseng
- fix lightgbm edge case issue courtesy of @imatiach-msft
- create binder setup for shap courtesy of @jamesmyatt
- Allow for multiple inputs in the gradient explainer courtesy of @gabrieltseng
- New KernelExplainer unit tests courtesy of @jorgecarleitao
- Add python 2/3 trove classifiers courtesy of @proinsias
- support for pyspark trees courtesy of @QuentinAmbard
- many other bug fixes courtesy of @Rygu, @Kylecrif, @trams, @imatiach-msft, @yunchuankong, @invokermain, @lupusomniator, @satyarta, @jotsif, @parkerzf, @jaller94, @gabrieltseng, and others
- Jupyter Notebook
Published by slundberg almost 7 years ago
shap - 0.29.2
Various bug fixes and improvements including:
- adding SHAP values for binary classification to CatBoost courtesy of @dvpolyakov
- Integer division fix for plots courtesy of @pmeier-tiplu
- Support passing in an Axes object to dependence_plot courtesy of @mqk
- Add adaptive average pooling and conv transpose layers courtesy of of @gabrieltseng
- fix import errors on a missing matplotlib backend courtesy of @hchandola
- fix TreeExplainer GradientBoostingClassifier bug courtesy of @prempiyush
- make tqdm play nicer with notebooks courtesy of @KOLANICH
- Allow deep_pytorch to use cuda models courtesy of @juliusbierk
- Fix sklearn GradientBoostingRegressor bug courtesy of @nasir-bhanpuri
- adding sparse support to shap linear explainer courtesy of @imatiach-msft
- Jupyter Notebook
Published by slundberg almost 7 years ago
shap - 0.29.0
A few contribution highlights of this release (in chronological order) - Better testing courtesy of @jorgecarleitao - Image plot customizations courtesy of @verdimrc - Batch norm support for PyTorch in DeepExplainer courtesy of @JiechengZhao - Leaky ReLU and other conv layer support for pytorch deep explainer courtesy of @gabrieltseng - Fixed keras multi input in gradient explainer and improved random seeds courtesy of @moritzaugustin - Support for catBoost ranker courtesy of @doramir - Added XGBRanker and LGBMRanker to TreeExplainer courtesy of @imatiach-msft - Fix embedding lookup with tf.keras in DeepExplainer courtesy of @andriy-nikolov - Custom dependence_plot colors maps courtesy of @rcarneva - Fix divide by zero issues possible with CatBoost models courtesy of @dvpolyakov - Lots of other bug fixes/improvements!
- Jupyter Notebook
Published by slundberg about 7 years ago
shap - 0.28.4
- Fixes memory corruption error from TreeExplainer (courtesy of @imatiach-msft)
- Adds support for skopt Random Forest and ExtraTrees Regressors (courtesy of @Bacoknight)
- Adds support for matplotlib forceplot with text rotation (courtesy of @vatsan)
- Adds a save_html function
- Jupyter Notebook
Published by slundberg over 7 years ago
shap - 0.28.0
- Add support for rank-based feature selection in
KernelExplainer. - Depreciate
l1_reg="auto"inKernelExplainerin favor of eventually defaulting tol1_reg="num_features(10)" - New color scales based on the Lch color space.
- Better auto-color choices for multi-class summary plots.
- Better plotting of NaN values in dependence_plots
- Updates for Pytorch 1.0 courtesy of @gabrieltseng
- Fix the sklearn DecisionTreeClassifier handling to correctly normalize to a probability output
- Enable multi-output model support for
TreeExplainerwhenfeature_dependence="independent" - Correctly load the objective of LightGBM models for use in explaining the model loss.
- Fix numerical precision mismatch with sklearn models.
- Fix numerical precision mismatch with XGBoost models by now directly loading from memory instead of JSON.
- Jupyter Notebook
Published by slundberg over 7 years ago
shap - 0.26.0
- Complete refactor of TreeExplainer to support deeper C++ integration
- The ability to explain transformed outputs of tree models in TreeExplainer, including the loss. In collaboration with @HughChen
- Allow for a dynamic reference value in DeepExplainer courtesy of @AvantiShri
- Add
x_jitteroption for categorical dependence plots courtesy of @ihopethiswillfi - Added support for GradientBoostingRegressor with quantile loss courtesy of @dmilad
- Better plotting support for NaN values
- Fixes several bugs.
- Jupyter Notebook
Published by slundberg over 7 years ago
shap - 0.25.0
- Support for PyTorch in GradientExplainer and preliminary support for PyTorch in DeepExplainer courtesy of @gabrieltseng.
- A matplotlib version of the single sample force_plot courtesy of @jverre.
- Support functional Keras models in GradientExplainer.
- KernelExplainer speed improvements.
- Various performance improvements and bug fixes.
- Jupyter Notebook
Published by slundberg over 7 years ago
shap - 0.23.0
This release includes a nice update courtesy of @imatiach-msft for KernelExplainer. KernelExplainer now runs faster and supports sparse data matrices!
We have also refactored DeepExplainer and made it compatible with TensorFlow 1.10. There are still a few issues to track down, but DeepExplainer is getting more complete :)
- Jupyter Notebook
Published by slundberg almost 8 years ago
shap - v0.22.0
Integrates the JS code from iml into shap to simplify dependencies. Adds support for more TensorFlow components in DeepExplainer. Refactors the plotting functions and removes some long-deprecated functions. Fixes an error in KernelExplainer when using a non-zero reference value (#192).
- Jupyter Notebook
Published by slundberg almost 8 years ago
shap - v0.20.0
This release brings a significant interface change. The expected value of the model is no longer included as the last column of the returned shapvalues array. Instead it can be accessed as `explainer.expectedvalue. This should make things much cleaner going forward, since the shape of the shap_values matrix will now be exactly the same as the input array to the model. This is particularly important for deep learning models with many dimensional input tensors. Note that because of this changeshap.force_plot()` now requires the model's expected (base) value as the first argument.
- Jupyter Notebook
Published by slundberg almost 8 years ago