Variable Importance filter using embedded feature selection of machine learning algorithms. Takes a mlr3::Learner which is capable of extracting the variable importance (property "importance"), fits the model and extracts the importance values to use as filter scores.

See also

Super class

mlr3filters::Filter -> FilterImportance

Public fields

learner

(mlr3::Learner)
Learner to extract the importance values from.

Methods

Public methods

Inherited methods

Method new()

Create a FilterImportance object.

Usage

FilterImportance$new(learner = mlr3::lrn("classif.rpart"))

Arguments

learner

(mlr3::Learner)
Learner to extract the importance values from.


Method clone()

The objects of this class are cloneable with this method.

Usage

FilterImportance$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

task = mlr3::tsk("iris") learner = mlr3::lrn("classif.rpart") filter = flt("importance", learner = learner) filter$calculate(task) as.data.table(filter)
#> feature score #> 1: Petal.Width 88.96940 #> 2: Petal.Length 81.34496 #> 3: Sepal.Length 54.09606 #> 4: Sepal.Width 36.01309