plot.ceteris_paribus_oscillations {ingredients} | R Documentation |
Plot Ceteris Paribus Oscillations
Description
This function plots local variable importance plots calculated as oscillations in the Ceteris Paribus Profiles.
Usage
## S3 method for class 'ceteris_paribus_oscillations'
plot(x, ..., bar_width = 10)
Arguments
x |
a ceteris paribus oscillation explainer produced with function |
... |
other explainers that shall be plotted together |
bar_width |
width of bars. By default |
Value
a ggplot2
object
References
Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. https://ema.drwhy.ai/
Examples
library("DALEX")
library("ranger")
apartments_rf_model <- ranger(m2.price ~., data = apartments)
explainer_rf <- explain(apartments_rf_model,
data = apartments_test[,-1],
y = apartments_test[,1],
label = "ranger forest",
verbose = FALSE)
apartment <- apartments_test[1:2,]
cp_rf <- ceteris_paribus(explainer_rf, apartment)
plot(cp_rf, color = "_ids_")
vips <- calculate_oscillations(cp_rf)
vips
plot(vips)
[Package ingredients version 2.3.0 Index]