treeExplainer: Decision tree local model explainer

Description Usage Arguments Value Author(s) Examples

View source: R/treeExplainer.R

Description

Fits a decision tree model to another model's predictions with the aim of explaining a black box model with decision rules

Usage

1
2
treeExplainer(train, trainedModel, sample = 0.1, seed = 1991,
  maxDepth = 2)

Arguments

train

[data.frame | Required] Training set on which the original model was trained

trainedModel

[mlr model object | Required] A trained model using the mlr pacakge or produced via autoLearn

sample

[numeric | Optional] A number between 0 - 1 to sub-sample the training set for faster computational time. Default of 0.1

seed

[integer | Optional] Random seed number for reproducable results. Default of 1991

maxDepth

[integer | Optional] Max depth of the decision tree. Default of 2

Value

Returns a list containing a plot

Author(s)

Xander Horn

Examples

1
2
mod <- mlr::train(makeLearner("classif.ranger"), iris.task)
treeExplainer(train = iris, mod, maxDepth = 5)

XanderHorn/autoML documentation built on Aug. 5, 2020, 11:45 a.m.