decisionplot {PPtreeregViz}R Documentation

Decision plot

Description

decision plot for PPKernelSHAP

Usage

decisionplot(
  PPTreeregOBJ,
  testObs,
  final.rule = 5,
  method = "simple",
  varImp = "shapImp",
  final.leaf = NULL,
  Yrange = FALSE
)

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 PPKernelSHAP

varImp

shapImp or treeImp - Sorted by descending order of variance or the variable importance from coefficient values of the nodes inside the PPTreereg.

final.leaf

location of final leaf

Yrange

show the entire final prediction range of the dependent variable. Default value is FALSE.

Details

Decision plots are mainly used to explain individual predictions that how the model makes decision, by focusing more on how model’s predictions reach to their expected y value with PPKernelSHAP values.

Value

An object of the class ggplot

Examples

data(dataXY)
testX <- dataXY[1,-1]
Model <- PPTreereg(Y~., data = dataXY, DEPTH = 2)
decisionplot(Model, testX, final.rule =5, method="simple")


[Package PPtreeregViz version 2.0.5 Index]