waterfallplot {PPtreeregViz} | R Documentation |
Waterfall plot
Description
waterfall plot for PPKernelSHAP
Usage
waterfallplot(
PPTreeregOBJ,
testObs,
final.rule = 5,
method = "simple",
final.leaf = NULL
)
Arguments
PPTreeregOBJ |
PPTreereg class object - a model to be explained |
testObs |
test data observation |
final.rule |
final rule to assign numerical values in the final nodes. 1: mean value in the final nodes 2: median value in the final nodes 3: using optimal projection 4: using all independent variables 5: using several significant independent variables |
method |
simple or empirical method to calculate |
final.leaf |
location of final leaf |
Details
Waterfall plot is mainly used to explain individual predictions,
and is suitable for showing an explanation when a single piece of data is
entered as an input using PPKernelSHAP
values.
Value
An object of the class ggplot
Examples
data(dataXY)
testX <- dataXY[1,-1]
Model <- PPTreereg(Y~., data = dataXY, DEPTH = 2)
waterfallplot(Model, testX, final.rule =5, method="simple")
[Package PPtreeregViz version 2.0.5 Index]