explain | R Documentation |
The 'explain()' function is a wrapper for 'DALEX' methods for model explanations. If possible it will use methods for tree-based models.
explain(models, test_data, y, verbose = FALSE)
models |
A single model or the model list created with the 'train()' function. |
test_data |
A test dataset returned from 'train()' function. |
y |
A target variable. It can be either (1) a vector of the same number of observations as 'data' or (2) a character name of variable in the 'data' that contains the target variable. |
verbose |
A logical value, if set to TRUE, provides all information about the process, if FALSE gives none. |
A list of DALEX explainers for 5 models of different engines.
## Not run:
data(lisbon)
train_output <- train(lisbon, 'Price', verbose = FALSE, random_evals = 2, bayes_iter = 1)
best_explainer <- explain(train_output$best_models_on_valid[[1]][1],
train_output$valid_data, train_output$y)
best_explainers <- explain(train_output$best_models_on_valid[[1]],
train_output$valid_data, train_output$y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.