SAGE with marginal sampling (features are marginalized independently). This is the standard SAGE implementation.
Super classes
FeatureImportanceMethod -> SAGE -> MarginalSAGE
Methods
MarginalSAGE$new()
Creates a new instance of the MarginalSAGE class.
Usage
MarginalSAGE$new(
task,
learner,
measure = NULL,
resampling = NULL,
features = NULL,
estimator = c("permutation", "kernel", "exact"),
n_permutations = NULL,
n_coalitions = NULL,
max_features = 12L,
batch_size = 5000L,
n_samples = 100L,
early_stopping = FALSE,
se_threshold = 0.025,
min_permutations = 10L,
check_interval = 1L
)Examples
library(mlr3)
task = tgen("friedman1")$generate(n = 100)
sage = MarginalSAGE$new(
task = task,
learner = lrn("regr.ranger", num.trees = 20),
measure = msr("regr.mse"),
n_permutations = 2L,
n_samples = 10
)
#> ℹ No <Resampling> provided, using `resampling = rsmp("holdout", ratio = 2/3)`
#> (test set size: 33)
sage$compute()