Description Usage Arguments Examples
This function creates a Shiny
application for explainers which are adapters for models created using the DALEX
package.
The application contains model performance and explanations to fully explore the model.
1 2 3 4 5 6 7 8 |
... |
one or more explainers created with |
directory |
path to the directory the application files will be created in. If |
selected_variables |
choosen variables for application start-up. There can be more added in the application interface through an input. |
run |
whether to run the Shiny application instantly |
override |
how to respond to a directory overriding case |
verbose |
whether to log in console internal function's steps |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Create models
library("ranger")
library("DALEX")
model_rf <- ranger(survived ~ .,
data = titanic_imputed,
classification = TRUE,
probability = TRUE)
model_glm <- glm(survived ~ .,
data = titanic_imputed,
family = "binomial")
# Create DALEX explainers
explainer_rf <- explain(model_rf,
data = titanic_imputed[,-8],
y = titanic_imputed$survived)
explainer_glm <- explain(model_glm,
data = titanic_imputed[,-8],
y = titanic_imputed$survived)
# Create and run the application
## Not run:
xai2shiny(explainer_rf, explainer_glm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.