powered by
Returns the most important variable names sorted descendingly.
most_important(x, top_m = Inf)
A character vector of variable names sorted in descending importance.
An object of class "light_importance".
Maximum number of important variables to be returned.
light_importance()
fit <- lm(Sepal.Length ~ ., data = iris) fl <- flashlight(model = fit, label = "lm", data = iris, y = "Sepal.Length") imp <- light_importance(fl) most_important(imp) most_important(imp, top_m = 2)
Run the code above in your browser using DataLab