Base class for filters. Predefined filters are stored in the dictionary mlr_filters. A Filter calculates a score for each feature of a task. Important features get a large value and unimportant features get a small value. Note that filter scores may also be negative.

## Details

Some features support partial scoring of the feature set: If nfeat is not NULL, only the best nfeat features are guaranteed to get a score. Additional features may be ignored for computational reasons, and then get a score value of NA.

Other Filter: mlr_filters_anova, mlr_filters_auc, mlr_filters_carscore, mlr_filters_cmim, mlr_filters_correlation, mlr_filters_disr, mlr_filters_find_correlation, mlr_filters_information_gain, mlr_filters_jmim, mlr_filters_jmi, mlr_filters_kruskal_test, mlr_filters_mim, mlr_filters_mrmr, mlr_filters_njmim, mlr_filters_performance, mlr_filters_variable_importance, mlr_filters_variance, mlr_filters

## Public fields

id

(character(1))
Identifier of the object. Used in tables, plot and text output.

task_type

(character(1))
Task type, e.g. "classif" or "regr".For a complete list of possible task types (depending on the loaded packages), see mlr_reflections$task_types$type.

task_properties

(character())

param_set

Set of hyperparameters.

feature_types

(character())
Feature types of the filter.

packages

(character())
Packages which this filter is relying on.

scores

Stores the calculated filter score values as named numeric vector. The vector is sorted in decreasing order with possible NA values last. Tied values (this includes NA values) appear in a random, non-deterministic order.

## Methods

### Method new()

Create a Filter object.

### Usage

Filter$new( id, task_type, task_properties = character(), param_set = ParamSet$new(),
feature_types = character(),
packages = character()
)

### Arguments

id

(character(1))
Identifier for the filter.

task_type

(character())
Types of the task the filter can operator on. E.g., "classif" or "regr".

task_properties

(character())
Required task properties, see mlr3::Task. Must be a subset of mlr_reflections$task_properties. param_set (paradox::ParamSet) Set of hyperparameters. feature_types (character()) Feature types the filter operates on. Must be a subset of mlr_reflections$task_feature_types.

packages

(character())
Set of required packages. Note that these packages will be loaded via requireNamespace(), and are not attached.

### Method format()

Format helper for Filter class

### Arguments

task

mlr3::Task to calculate the filter scores for.

nfeat

(integer())
THe minimum number of features to calculate filter scores for.

### Method clone()

The objects of this class are cloneable with this method.

### Usage

Filter\$clone(deep = FALSE)

### Arguments

deep

Whether to make a deep clone.