LOCO Class
LOCO Class
Methods
Method new()
Creates a new instance of this R6 class.
Usage
LOCO$new(task, learner, measure, resampling = NULL, features = NULL)
Method compute()
A short description...
Usage
LOCO$compute(relation = c("difference", "ratio"), store_backends = TRUE)
Arguments
relation
(character(1)) Calculate
"difference"
(default) or"ratio"
of original scores and scores after permutationstore_backends
(logical(1):
TRUE
) Passed to mlr3::resample to store backends in resample result. Required for some measures, but may increase memory footprint.
Examples
library(mlr3)
loco = LOCO$new(
task = tsk("zoo"),
learner = lrn("classif.rpart"),
measure = msr("classif.ce")
)
loco$compute()
#> Key: <feature>
#> feature importance
#> <char> <num>
#> 1: airborne 0
#> 2: aquatic 0
#> 3: backbone 0
#> 4: breathes 0
#> 5: catsize 0
#> 6: domestic 0
#> 7: eggs 0
#> 8: feathers 0
#> 9: fins 0
#> 10: hair 0
#> 11: legs 0
#> 12: milk 0
#> 13: predator 0
#> 14: tail 0
#> 15: toothed 0
#> 16: venomous 0