RFI generalizes CFI and PFI with arbitrary conditioning sets and samplers.
xplainfi::FeatureImportanceMethod -> xplainfi::PerturbationImportance -> RFI
new()Creates a new instance of the RFI class
RFI$new(
task,
learner,
measure = NULL,
resampling = NULL,
features = NULL,
groups = NULL,
conditioning_set = NULL,
relation = "difference",
n_repeats = 1L,
batch_size = NULL,
sampler = NULL
)task, learner, measure, resampling, features, groups, relation, n_repeats, batch_sizePassed to PerturbationImportance.
conditioning_set(character()) Set of features to condition on. Can be overridden in $compute().
Default (character(0)) is equivalent to PFI. In CFI, this would be set to all features except that of interest.
sampler(ConditionalSampler) Optional custom sampler. Defaults to ConditionalARFSampler.
compute()Compute RFI scores
RFI$compute(
conditioning_set = NULL,
n_repeats = NULL,
batch_size = NULL,
store_models = TRUE,
store_backends = TRUE
)conditioning_set(character()) Set of features to condition on. If NULL, uses the stored parameter value.
n_repeats(integer(1)) Number of permutation iterations. If NULL, uses stored value.
batch_size(integer(1) | NULL: NULL) Maximum number of rows to predict at once. If NULL, uses stored value.
store_models, store_backends(logical(1): TRUE) Whether to store fitted models / data backends, passed to mlr3::resample internally
for the initial fit of the learner.
This may be required for certain measures and is recommended to leave enabled unless really necessary.
clone()The objects of this class are cloneable with this method.
RFI$clone(deep = FALSE)deepWhether to make a deep clone.
König G, Molnar C, Bischl B, Grosse-Wentrup M (2021). “Relative Feature Importance.” In 2020 25th International Conference on Pattern Recognition (ICPR), 9318--9325. tools:::Rd_expr_doi("10.1109/ICPR48806.2021.9413090").