upsilon {xgrove}R Documentation

Explainability

Description

Compute explainability given predicted data of the model and an explainer.

Usage

upsilon(porig, pexp)

Arguments

porig

An object of class xgrove.

pexp

Name of the measure to be plotted on the x-axis, either "trees", "rules", "upsilon" or "cor".

Value

Numeric explainability upsilon.

Author(s)

gero.szepannek@web.de

References

Examples

library(randomForest)
library(pdp)
data(boston)
set.seed(42)
# Compute original model
rf <- randomForest(cmedv ~ ., data = boston)
data <- boston[,-3] # remove target variable
# Compute predictions
porig <- predict(rf, data)

# Compute surrogate grove
xg <- xgrove(rf, data)
pexp <- predict(xg$model, data, n.trees = 16)
upsilon(porig, pexp)


[Package xgrove version 0.1-7 Index]