Area under the (ROC) Curve filter, analogously to mlr3measures::auc() from mlr3measures. Missing values of the features are removed before calculating the AUC. If the AUC is undefined for the input, it is set to 0.5 (random classifier). The absolute value of the difference between the AUC and 0.5 is used as final filter value.

See also

Super class

mlr3filters::Filter -> FilterAUC

Methods

Public methods

Inherited methods

Method new()

Create a FilterAUC object.

Usage

FilterAUC$new(
  id = "auc",
  task_type = "classif",
  task_properties = "twoclass",
  param_set = ParamSet$new(),
  packages = "mlr3measures",
  feature_types = c("integer", "numeric")
)

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.

packages

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

feature_types

(character())
Feature types the filter operates on. Must be a subset of mlr_reflections$task_feature_types.


Method clone()

The objects of this class are cloneable with this method.

Usage

FilterAUC$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

task = mlr3::tsk("pima") filter = flt("auc") filter$calculate(task) head(as.data.table(filter), 3)
#> feature score #> 1: glucose 0.2927906 #> 2: insulin 0.2316288 #> 3: mass 0.1870358