View source: R/summarise_boots.R
summarise_importance | R Documentation |
vi_boots()
with upper
and lower bounds.Append a tibble of variable importances returned by vi_boots()
with upper
and lower bounds.
summarise_importance(.data, interval_width = 0.95, conf = NULL) summarize_importance(.data, interval_width = 0.95, conf = NULL)
.data |
a tibble of variable importances returned by |
interval_width |
a value between (0, 1) specifying the interval range. |
conf |
deprecated - please use |
Generates a summary of variable importances with an upper and lower
interval range. Uses the vi()
function from the {vip}
package to compute
variable importances (not all model types are supported by vip::vi()
; please
refer to {vip}
package documentation for supported model types). Presently,
the quantile()
function from the {stats}
package is used to determine
the lower, 50th percentile, and upper interval ranges.
## Not run: library(tidymodels) # setup a workflow without fitting wf <- workflow() %>% add_recipe(recipe(qsec ~ wt, data = mtcars)) %>% add_model(linear_reg()) # evaluate variable importance from 2000 models fit to mtcars set.seed(123) importances <- wf %>% vi_boots(n = 2000, training_data = mtcars, new_data = mtcars) # append with lower and upper bound importance summary columns importances %>% summarise_importance(interval_width = 0.95) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.