Combine two FeatureImportanceMethod objects
Usage
# S3 method for class 'FeatureImportanceMethod'
c(x, y, ...)
Examples
library(mlr3)
task = tgen("2dnormals")$generate(n = 100)
pfi1 = PFI$new(
task = task,
learner = lrn("classif.ranger", num.trees = 50, predict_type = "prob"),
measure = msr("classif.ce"),
features = "x1"
)
#> ℹ No <Resampling> provided, using holdout resampling with default ratio.
pfi1$compute()
#> Key: <feature>
#> feature importance
#> <char> <num>
#> 1: x1 0.2121212
pfi2 = PFI$new(
task = task,
learner = lrn("classif.ranger", num.trees = 50, predict_type = "prob"),
measure = msr("classif.ce"),
features = "x2"
)
#> ℹ No <Resampling> provided, using holdout resampling with default ratio.
pfi2$compute()
#> Key: <feature>
#> feature importance
#> <char> <num>
#> 1: x2 0.06060606
combined = c(pfi1, pfi2)