mlr3filters (version 0.3.0)

mlr_filters_anova: ANOVA F-Test Filter

Description

ANOVA F-Test filter calling stats::aov(). Note that this is equivalent to a \(t\)-test for binary classification.

The filter value is -log10(p) where p is the \(p\)-value. This transformation is necessary to ensure numerical stability for very small \(p\)-values.

Arguments

Super class

mlr3filters::Filter -> FilterAnova

Methods

Public methods

Method new()

Create a FilterAnova object.

Usage

FilterAnova$new(
  id = "anova",
  task_type = "classif",
  task_properties = character(),
  param_set = ParamSet$new(),
  feature_types = c("integer", "numeric"),
  packages = "stats"
)

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 clone()

The objects of this class are cloneable with this method.

Usage

FilterAnova$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

Dictionary of Filters: mlr_filters

Other Filter: Filter, mlr_filters_auc, mlr_filters_carscore, mlr_filters_cmim, mlr_filters_correlation, mlr_filters_disr, mlr_filters_find_correlation, mlr_filters_importance, 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_permutation, mlr_filters_variance, mlr_filters

Examples

Run this code
# NOT RUN {
task = mlr3::tsk("iris")
filter = flt("anova")
filter$calculate(task)
head(as.data.table(filter), 3)

# transform to p-value
10^(-filter$scores)
# }

Run the code above in your browser using DataLab