# \donttest{
if (requireNamespace("kernelshap", quietly = TRUE)) {
rf <- randomForestSRC::rfsrc(Ozone ~ ., data = na.omit(airquality),
ntree = 50)
gg_dta <- gg_shap(rf, bg_n = 20)
plot(gg_dta, type = "importance")
}
# }
Run the code above in your browser using DataLab