View source: R/most_important.R
most_important | R Documentation |
Returns the most important variable names sorted descendingly.
most_important(x, top_m = Inf)
## Default S3 method:
most_important(x, top_m = Inf)
## S3 method for class 'light_importance'
most_important(x, top_m = Inf)
x |
An object of class "light_importance". |
top_m |
Maximum number of important variables to be returned.
Defaults to |
A character vector of variable names sorted in descending order by importance.
most_important(default)
: Default method not implemented yet.
most_important(light_importance)
: Extracts most important variables from an object of class
"light_importance".
light_importance()
fit <- lm(Sepal.Length ~ ., data = iris)
fl <- flashlight(model = fit, label = "ols", data = iris, y = "Sepal.Length")
(imp <- light_importance(fl, seed = 4))
most_important(imp)
most_important(imp, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.