Package: shapviz 0.9.6

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.6.tar.gz
shapviz_0.9.6.zip(r-4.5)shapviz_0.9.6.zip(r-4.4)shapviz_0.9.6.zip(r-4.3)
shapviz_0.9.6.tgz(r-4.4-any)shapviz_0.9.6.tgz(r-4.3-any)
shapviz_0.9.6.tar.gz(r-4.5-noble)shapviz_0.9.6.tar.gz(r-4.4-noble)
shapviz_0.9.6.tgz(r-4.4-emscripten)shapviz_0.9.6.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

9.84 score 78 stars 205 scripts 3.4k downloads 17 exports 47 dependencies

Last updated 7 days agofrom:9e0bbf7832. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 16 2024
R-4.5-winOKNov 16 2024
R-4.5-linuxOKNov 16 2024
R-4.4-winOKNov 16 2024
R-4.4-macOKNov 16 2024
R-4.3-winOKNov 16 2024
R-4.3-macOKNov 16 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 Nov 16 2024.

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

Multiple 'shapviz' objects

Rendered frommultiple_output.Rmdusingknitr::rmarkdownon Nov 16 2024.

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

Tidymodels

Rendered fromtidymodels.Rmdusingknitr::rmarkdownon Nov 16 2024.

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

Using 'shapviz'

Rendered frombasic_use.Rmdusingknitr::rmarkdownon Nov 16 2024.

Last update: 2024-11-16
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