Base class generalizazing refit-based variable importance measures.
Default corresponds to leaving out each feature iters_refit
times, which
corresponds to LOCO (Leave One Covariate Out).
Public fields
direction
(character(1)
) Either "leave-out" or "leave-in".
Methods
Inherited methods
Method new()
Creates a new instance of this R6 class.
Usage
WVIM$new(
task,
learner,
measure,
resampling = NULL,
features = NULL,
groups = NULL,
direction = c("leave-out", "leave-in"),
label = "Williamson's Variable Importance Measure (WVIM)",
iters_refit = 1L
)
Arguments
task, learner, measure, resampling, features, groups
Passed to FeatureImportanceMethod
for construction.
direction
(character(1)
) Either "leave-out" or "leave-in".
label
(character(1)
) Method label.
iters_refit
(integer(1)
) Number of refit iterations per resampling iteration.
Method compute()
Computes leave-out or leave-in feature importance.
wvim_design_matrix(task$feature_names, "leave-out")
corresponds to LOCO.
Usage
WVIM$compute(store_backends = TRUE)
Arguments
store_backends
(logical(1)
) Passed to mlr3::resample to store
backends in resample result.
Required for some measures, but may increase memory footprint.
Method clone()
The objects of this class are cloneable with this method.
Arguments
deep
Whether to make a deep clone.