You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
New features
Use of a pre-trained mlr3 learner is now supported in PerturbationImportance (PFI, CFI, RFI) and SAGE methods.
Requires the provided Resampling to be instantiated and consist of a single iteration, e.g. there must be only 1 test set.
The rsmp_all_test(task) utility can be used to construct a single-iteration Resampling object from a given Task where all observations are alligned to the test set and the train set is empty. We will likely refine the API around this in the future.
Internally, a ResampleResult will be constructed from the given learner, task, and resampling arguments, which is then consistent with the previous default of performing resample() to get trained learners for each resampling iteration.
Inference
New ci_method = "lei" for WVIM/LOCO: distribution-free inference based on
Lei et al. (2018), testing observation-wise loss differences. Defaults to
Wilcoxon signed-rank test with median aggregation. Supports t-test, Fisher
permutation, and binomial (sign) tests. Requires a decomposable measure (with $obs_loss()).
New p_adjust parameter in $importance() for multiplicity correction across
all ci_methods that produce p-values ("raw", "nadeau_bengio", "cpi", "lei"). Accepts any method from stats::p.adjust.methods (e.g. "holm", "bonferroni", "BH"). Default is "none". When "bonferroni", confidence
intervals are also adjusted (alpha/k). For other methods, only p-values are
adjusted because sequential/adaptive procedures lack a clean per-comparison
alpha for CI construction.
Parametric ci_methods ("raw", "nadeau_bengio") return se, statistic, p.value, conf_lower, and conf_upper columns. The "quantile" method returns only conf_lower
and conf_upper (no se, statistic, or p.value).
Parametric ci_methods support alternative = "greater" (one-sided) or alternative = "two.sided" (the default) to test H0: importance <= 0 vs H1: importance > 0, or
H0: importance = 0 vs H1: importance != 0, respectively.
For "quantile", alternative controls whether the interval is one-sided
("greater": finite lower bound, conf_upper = Inf) or two-sided (both bounds finite).
Improved documentation for all CI methods in FeatureImportanceMethod, explaining
how p-values and confidence intervals are calculated for each method.
CFI documentation distinguishes between CPI (knockoff-based inference, Watson & Wright 2021)
and cARFi (ARF-based inference, Blesch et al. 2025).
Minor user-facing changes
Bump the defaults for n_repeats in favor of stability
For PerturbationImportance methods (PFI, CFI, RFI): n_repeats is now 30
LOCO and WVIM: n_repeats is now 30 as well.
Since the refitting methods will be more expensive than the perturbation-based methods, users will have to decrease this value if runtime becomes impractical, but now at least the package default is no longer n_repeats = 1, which is obviously too small.
Testing improvements
Replaced ranger with rpart in most tests where a flexible learner was unnecessary.
Added omnibus expect_method_output() expectation that validates all three main outputs ($importance(), $scores(), $obs_loss()) of a computed method.
Removed overly abstract test helper functions (test_basic_workflow, test_with_resampling, test_custom_sampler) and inlined their logic at call sites for better readability.
Use ConditionalGaussianSampler instead of ConditionalARFSampler in tests that don't specifically test ARF functionality.
Set explicit n_repeats values in all tests (1L for functional, 5L for plausibility).