Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MOKA1066 opened this issue Dec 30, 2024 · 0 comments
Assignees

Comments

@MOKA1066
Copy link

MOKA1066 commented Dec 30, 2024

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)
@be-marc be-marc self-assigned this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants