Implementation of CFI using modular sampling approach
xplainfi::FeatureImportanceMethod -> xplainfi::PerturbationImportance -> CFI
new()Creates a new instance of the CFI class
CFI$new(
task,
learner,
measure = NULL,
resampling = NULL,
features = NULL,
groups = NULL,
relation = "difference",
n_repeats = 1L,
batch_size = NULL,
sampler = NULL
)task, learner, measure, resampling, features, groups, relation, n_repeats, batch_sizePassed to PerturbationImportance.
sampler(ConditionalSampler) Optional custom sampler. Defaults to instantiating ConditionalARFSampler internally with default parameters.
compute()Compute CFI scores
CFI$compute(
n_repeats = NULL,
batch_size = NULL,
store_models = TRUE,
store_backends = TRUE
)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.
CFI$clone(deep = FALSE)deepWhether to make a deep clone.
Blesch K, Koenen N, Kapar J, Golchian P, Burk L, Loecher M, Wright M (2025). “Conditional Feature Importance with Generative Modeling Using Adversarial Random Forests.” Proceedings of the AAAI Conference on Artificial Intelligence, 39(15), 15596--15604. tools:::Rd_expr_doi("10.1609/aaai.v39i15.33712").