Skip to content
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

Unable to use "var.select" method of randomForestSRC #374

Open
littleisland8 opened this issue Feb 28, 2023 · 1 comment
Open

Unable to use "var.select" method of randomForestSRC #374

littleisland8 opened this issue Feb 28, 2023 · 1 comment

Comments

@littleisland8
Copy link

Hello.

I would like to use Random forest minimal depth (method="md" of var.select method of randomForestSRC ) and random forest variable hunting (method="vh" of var.select method of randomForestSRC) approaches to perform feature selection on a survTask.
I load the learner with:
learner = lrn("surv.rfsrc", importance="permute")
When I try to run flt("importance", learner = learner) I am able to get the feature score based on permutation score as the learner got importance="permute" as parameter. However, I cannot use var.select method to perform minimal depth and variable hunting because in the mlr_filters dictionary I cannot find something related to var.select of randomForestSRC.

How can I use var.select into the mlr3verse?

@sebffischer sebffischer transferred this issue from mlr-org/mlr3 Aug 16, 2024
@bblodfon
Copy link
Collaborator

bblodfon commented Oct 18, 2024

Hi @littleisland8,

As you've probably seen, for the flt("importance", learner = learner) to work, learner$importance() needs to return the importance scores of the features (usually from a default method from the package that implements the learner). randomForestSRC::var.select seems more like a more elaborate/extra analysis variable selection method with a lot of parameters, and maybe more suited to variable selection.

If you really want to and can get some sort of importance scores from such a function, then I would suggest extending the respective learner (code line) and override the importance() method by using inside var.select. Then using that new augmented learner with mlr3filters::flt("importance", ...) would work.

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