upsilon: Explainability

View source: R/xgrove.R

upsilonR 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

  • Szepannek, G. and Luebke, K.(2023): How much do we see? On the explainability of partial dependence plots for credit risk scoring, Argumenta Oeconomica 50, DOI: 10.15611/aoe.2023.1.07.

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)


xgrove documentation built on Sept. 23, 2024, 1:06 a.m.