View source: R/variable_importance.R
| variable_importance | R Documentation |
Variable importance
variable_importance(models, modelID = NULL, by_terms = FALSE,
parallel = FALSE, ncores = NULL,
progress_bar = TRUE, verbose = TRUE)
models |
an object of class |
modelID |
(character). Default = NULL. |
by_terms |
(logical) whether to calculate importance by model terms
(e.g., |
parallel |
(logical) whether to calculate importance in parallel. Default is FALSE. |
ncores |
(numeric) number of cores to use for parallel processing.
Default is NULL and uses available cores - 1. This is only applicable if
|
progress_bar |
(logical) whether to display a progress bar during processing. Default is TRUE. |
verbose |
(logical) whether to display detailed messages during processing. Default is TRUE. |
A data.frame containing the relative contribution of each variable (or term
if by_terms = TRUE). An identification for distinct models is added if
fitted contains multiple models.
plot_importance()
# Example with maxnet
# Import example of fitted_models (output of fit_selected())
data(fitted_model_maxnet, package = "kuenm2")
# Variable importance
imp_maxnet <- variable_importance(models = fitted_model_maxnet)
# Plot
plot_importance(imp_maxnet)
# Example with glm
# Import example of fitted_models (output of fit_selected())
data(fitted_model_glm, package = "kuenm2")
# Variable importance
imp_glm <- variable_importance(models = fitted_model_glm)
# Plot
plot_importance(imp_glm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.