Recent Releases of shapr
shapr - shapr 1.0.5
New features
- Added
get_results()for extracting key components from ashaprobject, including Shapley values, model parameters, and iterative computation details (#460). - Added
summary.shapr()method, which builds onget_results()and internalformat_xyz()functions to provide a concise overview of explanation objects (#460).
Improvements
- Enhanced
print.shapr()to support printing of specific components, with customizable control over digits and decimal precision (#460). - Refactored
cli-based output functions for improved reuse across multiple methods (#460). - Updated vignettes, examples, and tests to reflect the new functionality (#460).
- Fixed spelling, grammar, and other textual inconsistencies in documentation, comments, and vignettes (#465).
- Applied various minor visual improvements (#460, #464).
Bug fixes
- Fixed error when handling many features by removing
as.integer()coercion in the computation of coalitions per coalition size (#462).
Scientific Software - Peer-reviewed
- HTML
Published by martinju 4 months ago
shapr - shapr 1.0.4
- Implement semi-deterministic sampling of coalitions similar to the default in the shap python library and described
and discussed as the PySHAP* strategy in Olsen & Jullum (2024). It is disabled by
default, but can be set via
extra_computation_args = list(semi_deterministic_sampling = TRUE)inexplain(). The functionality is available when paired coalition sampling (the default) is enabled. See #449 for details. - Deletes the regression-surrogate parsnip object when testing to avoid future conflicts with model object changes. (Second last commit in #447).
- Improve and update the logic and print for setting the number of coalitions in the next iteration for
iterative = TRUE(#452) - Allow passing
vS_batching_methodtoexplain()/explain_forecast()to specify the batch computation method (default is"future"for both,"forloop"available mainly for dev purposes) (#452) Transform to use the
cliandrlangpackages to provide all messages/warnings/stops with nicer formatting and layout. The messages (viacli_inform()) now also obey theverboseargument and are displayed only if'basic' %in% verboseis TRUE. The header printout also differs betweenexplain()/explain_forecast()and whether called from Python. This also addscliandrlangto imports. (#453)Now using
testthat::skip_if_not_installedfor all tests requiring suggested packages to ensure they are skipped gracefully when dependencies are unavailable (#451)
Other minor fixes
- Two minor bugs related to
KernelSHAP_reweighing()(#448) - Two minor bugs related to weighting for asymmetric Shapley values (#449)
- Check
seedargument, and only pass totorchif not NULL (#452) - Make
explain_forecast()usefuturefor batch computation as well (by default) (#452) - Fix bug for the AICc + independence variants of
approach = 'empirical'occurring whenn_features < n_explain(#453)
Scientific Software - Peer-reviewed
- HTML
Published by martinju 8 months ago
shapr - shapr 1.0.3
- Fix documentation issues detected during shapr 1.0.2 release (#442)
- Remove examples from unexported functions
- Replace \dontrun by \donttest for long running examples
- Replace usage of
print()bywarning()on two occasions
- Fix issue with
Expected <nn_module> but got object of type <NULL>approach='vaeac'after recenttorchupdate broke it (#444) Changes default seed in
explain()andexplain_forecast()from 1 to NULL to avoid set.seed() to conflict with later called code (#445)Other minor fixes
Scientific Software - Peer-reviewed
- HTML
Published by martinju 9 months ago
shapr - shapr 1.0.2
- Fix CRAN NOTE which turned out to be bug related to returning NULL rather than integer(0) to identify (unconditional) asymmetric causal sampling (#435)
- [Py] Get 'shaprpy' up to speed with the latest 'shapr' version and return the internal list properly (#436)
- Allow manual groups in
explain_forecast()(#433) - Minor updates to readme and pkgdown site after CRAN release of shapr 1.0.1 (#437, #438)
- Require data.table >= 1.15.0 to allow uniform usage of
by=.I(#434) - Minor doc edits (#439)
Scientific Software - Peer-reviewed
- HTML
Published by martinju 11 months ago
shapr - shapr 1.0.1
- Spelling checking and other minor clean up #431)
- Add extracomputationargs and outputargs to explainforecast() #428)
- Rename vaeac plotting functions #428)
- Move explain() arguments
paired_shap_samplingandkernelSHAP_reweightingintoextra_computation_args#428) - Improved and unified the documentation #427)
- Remove seed argument from the boostrap function as its better handled by the mother function #427)
- Renamed various internal functions to be consistent with names in the rest of the package #427)
- Remove MSEv from explain_forecast (as it was only supported for horizon=1). Should return in a more general manner in the future #427)
- Improve efficiency of coalition sampling code and move to string sampling #426)
- Bugfix
iterative = TRUEforexplain_forecast()which was not using coalitions from previous iterations #426) - Bugfix the handling and output with the
verboseargument forexplain_forecast()#425) - Improved flexibility of the beeswarm plot functionality #424)
- Bugfix edge case where the
partypackage returns aconstpartyobject #423) - Bugfix error due to extra comma in rarely used warning #422)
- Shined up the vignettes a bit #421)
- Bugfix
keep_samp_for_vSwith iterative approach #417) - [Python] Brought the python code base up to speed with essentially all functionality in
explain()in R #416) - Please CRAN with dontrun on long running examples + skiponcran for the parallelized tests.
Scientific Software - Peer-reviewed
- HTML
Published by martinju 12 months ago
shapr - shapr 0.2.3 (GitHub only)
- Added support for groupSHAP, including check of appropriate groups, examples and tests
- Various modifications to input of internal functions to reflect that Shapley values may be computed both feature-wise and group-wise
- Fixed bug when passing non-named data to shapr() or explain() (e.g.
shapr(data[,1:5],model...)
Scientific Software - Peer-reviewed
- HTML
Published by martinju over 2 years ago
shapr - shapr 0.2.2
- Patch to fix failing CRAN-tests on R-devel due to changed behavior of
attach(): Fixed by changing how we simluate adding a function to .GlobalEnv in the failing test. Actual package not affected.
Scientific Software - Peer-reviewed
- HTML
Published by martinju over 2 years ago
shapr - shapr 0.2.1
- Patch to fix warning from development version of data.table due to the use of nomatch argument in merge(), as requested from data.table developers.
NOTE: Use the files named shapr_0.2.1... (not source code)
Scientific Software - Peer-reviewed
- HTML
Published by martinju over 2 years ago
shapr - shapr 0.2.0
- Minor CRAN release
- Added the new dependence modeling approach "ctree" which handles categorical features in addition to numerical ones. For more information see our paper https://doi.org/10.1007/978-3-030-57321-8_7
- Added support to explain models which take as input categorical features for model classes like xgboost which originally takes only numeric input. On the user side, an additional call to the new make_dummies function is required. See the vignette for details.
- Slight change in the user procedure for explaining predictions from custom models. This now requires only a single function predict_model.
- Introduced a thorough system for extracting and checking the feature information in the model and the data passed to shapr and explain. The features in the data are checked for consistency with what can be extracted from the model object. If the model object is missing some of the necessary information, the info from the data is used instead. The system checks feature labels, classes, and any factor levels.
- Due to the previous point, the feature_labels option previously used for custom models is removed.
- Added a manual testing script for custom model (currently cannot be handled by testthat due to environment issues).
- A few under-the-hood changes for checking in the shapr function.
Scientific Software - Peer-reviewed
- HTML
Published by martinju almost 5 years ago
shapr - shapr 0.1.4
- Patch to fulfill CRAN policy of using packages under Suggests conditionally (in tests and examples)
Scientific Software - Peer-reviewed
- HTML
Published by martinju almost 5 years ago
shapr - shapr 0.1.3
- Fix installation error on Solaris
- Updated README with CRAN installation instructions and badges
Scientific Software - Peer-reviewed
- HTML
Published by martinju over 5 years ago
shapr - shapr 0.1.2
- CRAN release
- Removed unused clustering code
- Removed several package dependencies
- Moved automatic check and pkgdown site build from Circle CI to GitHub actions
- Some minor efficiency fixes
- Changed stopping threshold from 12 to 13 features for none-sampling version of KernelSHAP for consistency with our recommendation
- Changed package title (shortened)
- Minor fixes to fulfill CRAN policy
- Improved documentation
- Revised internal/external and exported/non-exported functions, leading to far fewer external functions and a cleaner manual.
Scientific Software - Peer-reviewed
- HTML
Published by martinju over 5 years ago
shapr - shapr 0.1.1
- Journal of Open Source Software release
- Improved installation instructions and community guidelines in README
- Improved documentation
- Some minor bugfixes
Scientific Software - Peer-reviewed
- HTML
Published by martinju almost 6 years ago
shapr - shapr 0.1.0
- Support for custom models
- Improved documentation
- Automated testing using testthat
- Added vignette that gives an introduction to the package
- Added webpage for package using pkgdown
- Improved API for end user
- Various bugfixes
Scientific Software - Peer-reviewed
- HTML
Published by martinju about 6 years ago