Skip to content

Boruta filter in mlr3 returns different results from the Boruta function in Boruta package. #174

@MOKA1066

Description

@MOKA1066

It seems that the Boruta filter in mlr3 filters uses Boruta package, why they return different results?

Here is code:

# the Boruta filter in mlr3
library(mlr3)
library(mlr3filters)
task = mlr3::tsk("sonar")
filter = flt("boruta")
set.seed(12)
filter$calculate(task)
res1 = as.data.table(filter) |> 
    as_tibble() |> 
    dplyr::filter(score == 1)

# the Boruta function in Boruta package
library(Boruta)
set.seed(12)
var.sel = Boruta(Class ~ ., data = tsk("sonar")$data())
res2 = tibble(feature = names(var.sel$finalDecision), status = var.sel$finalDecision) |> dplyr::filter(status == "Confirmed")

# check the difference
setdiff(res1$feature, res2$feature)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions