plot.individual_variable_profile_oscillations: Plots Oscillations for Individual Variable Profiles

Description Usage Arguments Value Examples

View source: R/plot_ceteris_paribus_oscillations.R

Description

Function 'plot.individual_variable_profile_oscillations' plots variable importance plots.

Usage

1
2
## S3 method for class 'individual_variable_profile_oscillations'
plot(x, ...)

Arguments

x

a ceteris paribus oscillation explainer produced with function 'calculate_variable_oscillations()'

...

other explainers that shall be plotted together

Value

a ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library("DALEX2")
 ## 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 = apartments_test, y = apartments_test$m2.price)

apartment <- apartments_test[1:2,]

cp_rf <- individual_variable_profile(explainer_rf, apartment)
plot(cp_rf, color = "_ids_")

vips <- individual_variable_oscillations(cp_rf)
vips
plot(vips)

## End(Not run)

pbiecek/ceterisParibus2 documentation built on Sept. 16, 2019, 6:26 p.m.