calculate_oscillations: Calculate Oscillations for Ceteris Paribus Explainer

Description Usage Arguments Examples

View source: R/calculate_oscillations.R

Description

Calculate Oscillations for Ceteris Paribus Explainer

Usage

1

Arguments

x

a ceteris_paribus explainer produced with the 'ceteris_paribus()' function

sort

a logical value. If TRUE then rows are sorted along the oscillations

...

other arguments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library("DALEX")
 ## Not run: 
library("randomForest")
set.seed(59)

apartments_rf_model <- randomForest(m2.price ~ construction.year + surface + floor +
      no.rooms + district, data = apartments)

explainer_rf <- explain(apartments_rf_model,
      data = apartmentsTest, y = apartmentsTest$m2.price)

apartment <- apartmentsTest[1,]

cp_rf <- ceteris_paribus(explainer_rf, apartment)
calculate_oscillations(cp_rf)

## End(Not run)

ceterisParibus documentation built on March 31, 2020, 5:22 p.m.