Package: shapviz 0.9.5

Michael Mayer

shapviz: SHAP Visualizations

Visualizations for SHAP (SHapley Additive exPlanations), such as waterfall plots, force plots, various types of importance plots, dependence plots, and interaction plots. These plots act on a 'shapviz' object created from a matrix of SHAP values and a corresponding feature dataset. Wrappers for the R packages 'xgboost', 'lightgbm', 'fastshap', 'shapr', 'h2o', 'treeshap', 'DALEX', and 'kernelshap' are added for convenience. By separating visualization and computation, it is possible to display factor variables in graphs, even if the SHAP values are calculated by a model that requires numerical features. The plots are inspired by those provided by the 'shap' package in Python, but there is no dependency on it.

Authors:Michael Mayer [aut, cre], Adrian Stando [ctb]

shapviz_0.9.5.tar.gz
shapviz_0.9.5.zip(r-4.5)shapviz_0.9.5.zip(r-4.4)shapviz_0.9.5.zip(r-4.3)
shapviz_0.9.5.tgz(r-4.4-any)shapviz_0.9.5.tgz(r-4.3-any)
shapviz_0.9.5.tar.gz(r-4.5-noble)shapviz_0.9.5.tar.gz(r-4.4-noble)
shapviz_0.9.5.tgz(r-4.4-emscripten)shapviz_0.9.5.tgz(r-4.3-emscripten)
shapviz.pdf |shapviz.html
shapviz/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/modeloriented/shapviz/issues

Datasets:
  • miami - Miami-Dade County House Prices

On CRAN:

explainable-aimachine-learningshapshapley-valuevisualizationxai

17 exports 76 stars 4.04 score 47 dependencies 179 scripts 3.2k downloads

Last updated 3 days agofrom:96da952782. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 14 2024
R-4.5-winOKSep 14 2024
R-4.5-linuxOKSep 14 2024
R-4.4-winOKSep 14 2024
R-4.4-macOKSep 14 2024
R-4.3-winOKSep 14 2024
R-4.3-macOKSep 14 2024

Exports:collapse_shapformat_maxget_baselineget_feature_valuesget_shap_interactionsget_shap_valuesis.mshapvizis.shapvizmshapvizpotential_interactionsshapvizsv_dependencesv_dependence2Dsv_forcesv_importancesv_interactionsv_waterfall

Dependencies:clicolorspacecommonmarkcurldata.tablefansifarverggfittextgggenesggplot2ggrepelgluegridtextgtableisobandjpegjsonlitelabelinglatticelifecyclemagrittrmarkdownMASSMatrixmgcvmunsellnlmepatchworkpillarpkgconfigpngR6RColorBrewerRcpprlangscalesshadesstringistringrtibbleutf8vctrsviridisLitewithrxfunxgboostxml2

Geographic Components

Rendered fromgeographic.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-09-11
Started: 2023-06-07

Multiple 'shapviz' objects

Rendered frommultiple_output.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-08-19
Started: 2023-04-07

Tidymodels

Rendered fromtidymodels.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-09-14
Started: 2024-09-05

Using 'shapviz'

Rendered frombasic_use.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-09-11
Started: 2023-04-07

Readme and manuals

Help Manual

Help pageTopics
shapviz: SHAP Visualizationsshapviz-package
Subsets "shapviz" Object[.shapviz
Rowbinds two "shapviz" Objects+.mshapviz +.shapviz
Concatenates "shapviz" Objectsc.shapviz
Collapse SHAP valuescollapse_shap
Dimensions of "shapviz" Objectdim.shapviz
Dimnames of "shapviz" Objectdimnames.shapviz
Dimnames (Replacement Method) of "shapviz" Objectdimnames<-.shapviz
Extractor Functionsextractors get_baseline get_baseline.default get_baseline.mshapviz get_baseline.shapviz get_feature_values get_feature_values.default get_feature_values.mshapviz get_feature_values.shapviz get_shap_interactions get_shap_interactions.default get_shap_interactions.mshapviz get_shap_interactions.shapviz get_shap_values get_shap_values.default get_shap_values.mshapviz get_shap_values.shapviz
Number Formatterformat_max
Check for mshapvizis.mshapviz
Check for shapvizis.shapviz
Miami-Dade County House Pricesmiami
Combines compatible "shapviz" Objectsmshapviz
Interaction Strengthpotential_interactions
Prints "mshapviz" Objectprint.mshapviz
Prints "shapviz" Objectprint.shapviz
Rowbinds Multiple "shapviz" or "mshapviz" Objectsrbind.mshapviz rbind.shapviz
Initialize "shapviz" Objectshapviz shapviz.default shapviz.explain shapviz.H2OBinomialModel shapviz.H2OModel shapviz.H2ORegressionModel shapviz.kernelshap shapviz.lgb.Booster shapviz.matrix shapviz.predict_parts shapviz.shapr shapviz.treeshap shapviz.xgb.Booster
Splits "shapviz" Objectsplit.shapviz
Summarizes "shapviz" Objectsummary.shapviz
SHAP Dependence Plotsv_dependence sv_dependence.default sv_dependence.mshapviz sv_dependence.shapviz
2D SHAP Dependence Plotsv_dependence2D sv_dependence2D.default sv_dependence2D.mshapviz sv_dependence2D.shapviz
SHAP Force Plotsv_force sv_force.default sv_force.mshapviz sv_force.shapviz
SHAP Importance Plotssv_importance sv_importance.default sv_importance.mshapviz sv_importance.shapviz
SHAP Interaction Plotsv_interaction sv_interaction.default sv_interaction.mshapviz sv_interaction.shapviz
SHAP Waterfall Plotsv_waterfall sv_waterfall.default sv_waterfall.mshapviz sv_waterfall.shapviz