Description Usage Arguments Value Examples
View source: R/plot_ceteris_paribus_oscillations.R
Function 'plot.ceteris_paribus_oscillations' plots variable importance plots.
1 2 |
x |
a ceteris paribus oscillation explainer produced with function 'calculate_oscillations()' |
... |
other explainers that shall be plotted together |
a ggplot2 object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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:2,]
cp_rf <- ceteris_paribus(explainer_rf, apartment)
plot(cp_rf, color = "_ids_")
vips <- calculate_oscillations(cp_rf)
vips
plot(vips)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.