Package: shapr 1.0.1.9000

Martin Jullum

shapr: Prediction Explanation with Dependence-Aware Shapley Values

Complex machine learning models are often hard to interpret. However, in many situations it is crucial to understand and explain why a model made a specific prediction. Shapley values is the only method for such prediction explanation framework with a solid theoretical foundation. Previously known methods for estimating the Shapley values do, however, assume feature independence. This package implements methods which accounts for any feature dependence, and thereby produces more accurate estimates of the true Shapley values. An accompanying 'Python' wrapper ('shaprpy') is available through the GitHub repository.

Authors:Martin Jullum [cre, aut], Lars Henry Berge Olsen [aut], Annabelle Redelmeier [aut], Jon Lachmann [aut], Nikolai Sellereite [aut], Anders Løland [ctb], Jens Christian Wahl [ctb], Camilla Lingjærde [ctb], Norsk Regnesentral [cph, fnd]

shapr_1.0.1.9000.tar.gz
shapr_1.0.1.9000.zip(r-4.5)shapr_1.0.1.9000.zip(r-4.4)shapr_1.0.1.9000.zip(r-4.3)
shapr_1.0.1.9000.tgz(r-4.4-x86_64)shapr_1.0.1.9000.tgz(r-4.4-arm64)shapr_1.0.1.9000.tgz(r-4.3-x86_64)shapr_1.0.1.9000.tgz(r-4.3-arm64)
shapr_1.0.1.9000.tar.gz(r-4.5-noble)shapr_1.0.1.9000.tar.gz(r-4.4-noble)
shapr_1.0.1.9000.tgz(r-4.4-emscripten)shapr_1.0.1.9000.tgz(r-4.3-emscripten)
shapr.pdf |shapr.html
shapr/json (API)
NEWS

# Install 'shapr' in R:
install.packages('shapr', repos = c('https://norskregnesentral.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/norskregnesentral/shapr/issues

Pkgdown site:https://norskregnesentral.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

explainable-aiexplainable-mlrcpprcpparmadilloshapleyopenblascppopenmp

10.42 score 152 stars 1 packages 172 scripts 1.3k downloads 40 exports 12 dependencies

Last updated 1 days agofrom:c30ecf3a2a. Checks:3 OK, 6 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKJan 22 2025
R-4.5-win-x86_64OKJan 22 2025
R-4.5-linux-x86_64OKJan 22 2025
R-4.4-win-x86_64NOTEJan 22 2025
R-4.4-mac-x86_64NOTEJan 22 2025
R-4.4-mac-aarch64NOTEJan 22 2025
R-4.3-win-x86_64NOTEJan 22 2025
R-4.3-mac-x86_64NOTEJan 22 2025
R-4.3-mac-aarch64NOTEJan 22 2025

Exports:additional_regression_setupappend_vS_listcheck_convergencecli_compute_vScli_itercli_startupcoalition_matrix_cppcompute_estimatescompute_shapleycompute_timecompute_vSexplainexplain_forecastfinalize_explanationget_extra_comp_args_defaultget_iterative_args_defaultget_model_specsget_output_args_defaultget_supported_approachesget_supported_modelsplot_MSEv_eval_critplot_SV_several_approachesplot_vaeac_eval_critplot_vaeac_imputed_ggpairspredict_modelprepare_dataprepare_data_causalprepare_next_iterationprint_iterregression.train_modelsave_resultssetupsetup_approachshapley_setuptesting_cleanupvaeac_get_evaluation_criteriavaeac_get_extra_para_defaultvaeac_train_modelvaeac_train_model_continueweight_matrix

Dependencies:codetoolsdata.tabledigestfuturefuture.applyglobalslatticelistenvMatrixparallellyRcppRcppArmadillo

shapr: Explaining individual machine learning predictions with Shapley values

Rendered fromgeneral_usage.Rmdusingknitr::rmarkdownon Jan 22 2025.

Last update: 2025-01-16
Started: 2024-12-23

Asymmetric and causal Shapley value explanations

Rendered fromasymmetric_causal.Rmdusingknitr::rmarkdownon Jan 22 2025.

Last update: 2025-01-20
Started: 2024-12-23

More details and advanced usage of the vaeac approach

Rendered fromvaeac.Rmdusingknitr::rmarkdownon Jan 22 2025.

Last update: 2025-01-16
Started: 2024-12-23

Shapley value explanations using the regression paradigm

Rendered fromregression.Rmdusingknitr::rmarkdownon Jan 22 2025.

Last update: 2025-01-21
Started: 2024-12-23