View source: R/surv_feature_importance.R
surv_feature_importance | R Documentation |
model_parts.R
This function is used to calculate permutational feature importance using a time-dependent metric. The result is the change in loss function at each time point after permuting each selected variable.
surv_feature_importance(x, ...)
## S3 method for class 'surv_explainer'
surv_feature_importance(
x,
loss_function = NULL,
...,
type = c("raw", "ratio", "difference"),
B = 10,
variables = NULL,
variable_groups = NULL,
N = NULL,
label = NULL
)
x |
an explainer object - model preprocessed by the |
... |
other parameters, currently ignored |
loss_function |
a function that will be used to assess variable importance, by default |
type |
a character vector, if |
B |
numeric, number of permutations to be calculated |
variables |
a character vector, names of variables to be included in the calculation |
variable_groups |
a list of character vectors of names of explanatory variables. For each vector, a single variable importance measure is computed for the joint effect of the variables which names are provided in the vector. By default, |
N |
numeric, number of observations that are to be sampled from the dataset for the purpose of calculation |
label |
label of the model, if provided overrides |
Note: This function can be run within progressr::with_progress()
to display a progress bar, as the execution can take long, especially on large datasets.
A data.frame containing results of the calculation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.