Kruskal-Wallis rank sum test filter calling stats::kruskal.test().

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.

Format

R6::R6Class inheriting from Filter.

Construction

FilterKruskalTest$new()
mlr_filters$get("kruskal_test")
flt("kruskal_test")

See also

Examples

task = mlr3::tsk("iris") filter = flt("kruskal_test") filter$calculate(task) as.data.table(filter)
#> feature score #> 1: Petal.Width 28.48654 #> 2: Petal.Length 28.31840 #> 3: Sepal.Length 21.04970 #> 4: Sepal.Width 13.80430
# transform to p-value 10^(-filter$scores)
#> Petal.Width Petal.Length Sepal.Length Sepal.Width #> 3.261796e-29 4.803974e-29 8.918734e-22 1.569282e-14