Learn R Programming

PPtreeregViz (version 2.0.5)

PPshapsummary: Summary plot

Description

Summary plot using PPKernelSHAP

Usage

PPshapsummary(data_long,...)

Value

An object of the class ggplot

Arguments

data_long

ppshapr_prep class object.

...

arguments to be passed to methods

Details

A summary plot is used to see the aspects of important variables for each final node. The summary plot summarizes information about the independent variables that contributed the most to the model's prediction in the training data in the form of a density plot.

Examples

Run this code
# \donttest{
data(dataXY)
testX <- dataXY[1,-1]
Model <- PPTreereg(Y~., data = dataXY, DEPTH = 2)
shap_long <- ppshapr_prep(Model, final.rule =5, method="simple")
PPshapsummary(shap_long)
# }

Run the code above in your browser using DataLab