Calculates Leave-One-Covariate-Out (LOCO) scores.
xplainfi::FeatureImportanceMethod -> xplainfi::WVIM -> LOCO
new()Creates a new instance of this R6 class.
LOCO$new(
task,
learner,
measure = NULL,
resampling = NULL,
features = NULL,
n_repeats = 1L
)task(mlr3::Task) Task to compute importance for.
learner(mlr3::Learner) Learner to use for prediction.
measure(mlr3::Measure: NULL) Measure to use for scoring. Defaults to
classif.ce for classification and regr.mse for regression.
resampling(mlr3::Resampling) Resampling strategy. Defaults to holdout.
features(character()) Features to compute importance for. Defaults to all features.
n_repeats(integer(1): 1L) Number of refit iterations per resampling iteration.
compute()Compute LOCO importances.
LOCO$compute(store_models = TRUE, store_backends = TRUE)store_models, store_backends(logical(1): TRUE) Whether to store fitted models / data backends, passed to mlr3::resample internally
clone()The objects of this class are cloneable with this method.
LOCO$clone(deep = FALSE)deepWhether to make a deep clone.
LOCO measures feature importance by comparing model performance with and without each feature. For each feature, the model is retrained without that feature and the performance difference (reduced_model_loss - full_model_loss) indicates the feature's importance. Higher values indicate more important features.
Lei J, G'Sell M, Rinaldo A, Tibshirani R, Wasserman L (2018). “Distribution-Free Predictive Inference for Regression.” Journal of the American Statistical Association, 113(523), 1094--1111. tools:::Rd_expr_doi("10.1080/01621459.2017.1307116").