diff --git a/articles/basic_use.html b/articles/basic_use.html index 5b50d50..c3c7d4c 100644 --- a/articles/basic_use.html +++ b/articles/basic_use.html @@ -133,7 +133,7 @@
If you work with a boosted trees H2O model:
+H2O supports TreeSHAP for boosted trees and random forests. For other +models, model agnostic method based on marginal expectations are used, +requiring a background dataset.
library(shapviz)
library(h2o)
@@ -305,10 +307,18 @@ H2O
h2o.init()
iris2 <- as.h2o(iris)
-fit <- h2o.gbm(colnames(iris[-1]), "Sepal.Length", training_frame = iris2)
-shp <- shapviz(fit, X_pred = iris)
-sv_force(shp, row_id = 1)
-sv_dependence(shp, "Species")
Mayer M (2024). +
Mayer M (2025). shapviz: SHAP Visualizations. R package version 0.9.7, https://modeloriented.github.io/shapviz/, https://github.com/ModelOriented/shapviz.
@Manual{, title = {shapviz: SHAP Visualizations}, author = {Michael Mayer}, - year = {2024}, + year = {2025}, note = {R package version 0.9.7, https://modeloriented.github.io/shapviz/}, url = {https://github.com/ModelOriented/shapviz}, }diff --git a/index.html b/index.html index 457b1c6..a8aa197 100644 --- a/index.html +++ b/index.html @@ -122,7 +122,7 @@
SHAP and feature values are stored in a “shapviz” object that is built from:
This function creates an object of class "shapviz" from a matrix of SHAP values, or from a fitted model of type
XGBoost,
LightGBM, or
H2O (tree-based models).
H2O.
Furthermore, shapviz()
can digest the results of
shapr::explain()
,
treeshap::treeshap()
,
Should SHAP interactions be calculated (default is FALSE
)?
Only available for XGBoost.
Background dataset for baseline SHAP or marginal SHAP. +Only for H2O models.
If model has link function, this argument controls whether the
+SHAP values should be linearly (= approximately) transformed to the original scale
+(if TRUE
). The default is to return the values on link scale.
+Only for H2O models.
Switches between different algorithms, see
+?h2o::h2o.predict_contributions
for details.
+Only for H2O models.
shapviz(shapr)
: Creates a "shapviz" object from shapr::explain()
.
shapviz(kernelshap)
: Creates a "shapviz" object from an object of class 'kernelshap'. This includes
results of kernelshap()
, permshap()
, and additive_shap()
.
shapviz(H2ORegressionModel)
: Creates a "shapviz" object from a (tree-based) H2O regression model.
shapviz(H2OBinomialModel)
: Creates a "shapviz" object from a (tree-based) H2O binary classification model.
shapviz(H2OModel)
: Creates a "shapviz" object from a (tree-based) H2O model (base class).
shapviz(H2OModel)
: Creates a "shapviz" object from an H2O model.