autoplot.importance_perm | R Documentation |
Visualize importance scores
## S3 method for class 'importance_perm'
autoplot(
object,
top = Inf,
metric = NULL,
eval_time = NULL,
type = "importance",
std_errs = stats::qnorm(0.95),
...
)
object |
A tibble of results from |
top |
An integer for how many terms to show. To define importance when there are multiple metrics, the rankings of predictors are computed across metrics and the average rank is used. In the case of tied rankings, all the ties are included. |
metric |
A character vector or |
eval_time |
For censored regression models, a vector of time points at which the survival probability is estimated. |
type |
A character value. The default is |
std_errs |
The number of standard errors to plot (when |
... |
Not used. |
A ggplot2
object.
# Pre-computed results. See code at
system.file("make_imp_example.R", package = "important")
# Load the results
load(system.file("imp_examples.RData", package = "important"))
# A classification model with two classes and highly correlated predictors.
# To preprocess them, PCA feature extraction is used.
#
# Let’s first view the importance in terms of the original predictor set
# using 50 permutations:
imp_orig
autoplot(imp_orig, top = 10)
# Now assess the importance in terms of the PCA components
imp_derv
autoplot(imp_derv)
autoplot(imp_derv, metric = "brier_class", type = "difference")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.