Calculates Leave-One-Covariate-Out (LOCO) scores.
Details
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.
References
Lei, Jing, Max, G'Sell, Alessandro, Rinaldo, J. R, Tibshirani, Wasserman, Larry (2018). “Distribution-Free Predictive Inference for Regression.” Journal of the American Statistical Association, 113(523), 1094–1111. ISSN 0162-1459, doi:10.1080/01621459.2017.1307116 .
Super classes
xplainfi::FeatureImportanceMethod
-> xplainfi::WVIM
-> LOCO
Methods
Method new()
Creates a new instance of this R6 class.
Usage
LOCO$new(
task,
learner,
measure,
resampling = NULL,
features = NULL,
iters_refit = 1L
)
Arguments
task
(mlr3::Task) Task to compute importance for.
learner
(mlr3::Learner) Learner to use for prediction.
measure
(mlr3::Measure) Measure to use for scoring.
resampling
(mlr3::Resampling) Resampling strategy. Defaults to holdout.
features
(
character()
) Features to compute importance for. Defaults to all features.iters_refit
(
integer(1)
:1L
) Number of refit iterations per resampling iteration.
Method compute()
Compute LOCO importances.
Arguments
store_backends
(
logical(1)
) Passed to mlr3::resample to store backends in resample result. Required for some measures, but may increase memory footprint.