get_variable_importance: Get variable importances

View source: R/variable_importance.R

get_variable_importanceR Documentation

Get variable importances

Description

Get variable importances

Usage

get_variable_importance(models, remove_zeros = TRUE, top_n)

Arguments

models

model_list object

remove_zeros

Remove features with zero variable importance? Default is TRUE

top_n

Integer: How many variables to return? The top_n most important variables be returned. If missing (default), all variables are returned

Details

Some algorithms provide variable importance, others don't. The best-performing model that offers variable importance will be used.

Value

Data frame of variables and their importance for predictive power

See Also

plot.variable_importance

Examples

m <- machine_learn(mtcars, outcome = mpg, models = "rf", tune = FALSE)
(vi <- get_variable_importance(m))
plot(vi)

healthcareai documentation built on Sept. 5, 2022, 5:12 p.m.