overall_comparison: Compare champion with challengers globally

Description Usage Arguments Value Examples

View source: R/overall_comparison.R

Description

The function creates objects that present global model perfromance using various measures. Those date can be easily ploted with plot function. It uses auditor package to create model_performance of all passed explainers. Keep in mind that type of task has to be specified.

Usage

1
overall_comparison(champion, challengers, type)

Arguments

champion

- explainer of champion model.

challengers

- explainer of challenger model or list of explainers.

type

- type of the task. Either classification or regression

Value

An object of the class overall_comparison

It is a named list containing following fields:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library("DALEXtra")
library("mlr")
task <- mlr::makeRegrTask(
  id = "R",
  data = apartments,
  target = "m2.price"
)
learner_lm <- mlr::makeLearner(
  "regr.lm"
)
model_lm <- mlr::train(learner_lm, task)
explainer_lm <- explain_mlr(model_lm, apartmentsTest, apartmentsTest$m2.price, label = "LM")

learner_rf <- mlr::makeLearner(
  "regr.randomForest"
)
model_rf <- mlr::train(learner_rf, task)
explainer_rf <- explain_mlr(model_rf, apartmentsTest, apartmentsTest$m2.price, label = "RF")

learner_gbm <- mlr::makeLearner(
  "regr.gbm"
)
model_gbm <- mlr::train(learner_gbm, task)
explainer_gbm <- explain_mlr(model_gbm, apartmentsTest, apartmentsTest$m2.price, label = "gbm")

data <- overall_comparison(explainer_lm, list(explainer_gbm, explainer_rf), type = "regression")
plot(data)

DALEXtra documentation built on May 9, 2021, 9:07 a.m.