Description Usage Arguments Value Examples
Function 'plot_interactive.what_if_explainer' plots Ceteris Paribus Plots for a single prediction.
1 2 3 4 5 6 7 | ## S3 method for class 'what_if_explainer'
plot_interactive(x, ..., split = "models", color = "variables")
plot_interactive(x, ...)
## Default S3 method:
plot_interactive(x, ..., split = "models", color = "variables")
|
x |
a ceteris_paribus explainer produced with the 'ceteris_paribus' function |
... |
other explainers that shall be plotted together |
split |
a character, either 'models' or 'variables'. Sets the variable for faceting |
color |
a character, either 'models' or 'variables'. Sets the variable for coloring |
a ggiraph 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("ggiraph")
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[,2:6], y = apartmentsTest$m2.price)
new_apartment <- apartmentsTest[1, ]
new_apartment
wi_rf <- what_if(explainer_rf, observation = new_apartment)
wi_rf
plot_interactive(wi_rf, split = "variables", color = "variables")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.