5959# [2,] 2.463307e-16 5.661049e-16 1.110223e-15 1.755417e-16
6060
6161# Plot with shapviz
62- shp <- shapviz(s ) # for CRAN release : shapviz(s$S, s$X, s$baseline)
62+ shp <- shapviz(s ) # until shapviz 0.2.0 : shapviz(s$S, s$X, s$baseline)
6363sv_waterfall(shp , 1 )
6464sv_importance(shp )
6565sv_dependence(shp , " Petal.Length" )
@@ -84,7 +84,7 @@ pred_fun <- function(X) predict(fit, X, type = "response")
8484s <- kernelshap(iris [1 : 2 ], pred_fun = pred_fun , bg_X = iris [1 : 2 ])
8585
8686# Plot with shapviz
87- shp <- shapviz(s ) # for CRAN release : shapviz(s$S, s$X, s$baseline)
87+ shp <- shapviz(s ) # until shapviz 0.2.0 : shapviz(s$S, s$X, s$baseline)
8888sv_waterfall(shp , 51 )
8989sv_dependence(shp , " Sepal.Length" )
9090```
@@ -127,7 +127,7 @@ system.time(
127127)
128128
129129# Plot with shapviz
130- shp <- shapviz(s ) # for CRAN release : shapviz(s$S, s$X, s$baseline)
130+ shp <- shapviz(s ) # until shapviz 0.2.0 : shapviz(s$S, s$X, s$baseline)
131131sv_waterfall(shp , 1 )
132132sv_importance(shp )
133133sv_dependence(shp , " Petal.Length" )
@@ -153,7 +153,7 @@ task_iris <- TaskRegr$new(id = "iris", backend = iris, target = "Sepal.Length")
153153fit_lm <- lrn(" regr.lm" )
154154fit_lm $ train(task_iris )
155155s <- kernelshap(iris , function (X ) fit_lm $ predict_newdata(X )$ response , bg_X = iris )
156- sv <- shapviz(s ) # for CRAN release : shapviz(s$S, s$X, s$baseline)
156+ sv <- shapviz(s ) # until shapviz 0.2.0 : shapviz(s$S, s$X, s$baseline)
157157sv_waterfall(sv , 1 )
158158sv_dependence(sv , " Species" )
159159```
@@ -176,7 +176,7 @@ fit <- train(
176176)
177177
178178s <- kernelshap(iris [1 , - 1 ], function (X ) predict(fit , X ), bg_X = iris [- 1 ])
179- sv <- shapviz(s ) # for CRAN release : shapviz(s$S, s$X, s$baseline)
179+ sv <- shapviz(s ) # until shapviz 0.2.0 : shapviz(s$S, s$X, s$baseline)
180180sv_waterfall(sv , 1 )
181181```
182182
0 commit comments