-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
selected_features for learners that don't support it should be the entirety of features seen in training #935
Comments
library(mlr3)
library(mlr3learners)
learner = lrn("classif.rpart")
task = tsk("spam")
learner$train(task)
learner$selected_features()
#> [1] "charDollar" "hp"
#> [3] "remove" "charExclamation"
#> [5] "capitalTotal" "free"
learner = lrn("classif.log_reg")
learner$train(task)
learner$selected_features()
# > Error: attempt to apply non-function |
so first order of business would be here to extend the docs, the docs don't say what happens if the property does not exists |
currently mlr3pipelines handles this on its own end if this flag is set: |
i would suggest this b) selected_features as a method is present in all learners. |
|
we also need to remove this from pipelines then |
Closed by #1230 |
This way we could correctly query a pipeline that selects features first and gives the result to a learner. The GraphLearner could then ask the learner at the end how many features it used, and if it is a learner that supports embedded featsel (rpart e.g.) then this would give the correct value, but even for learners that do not do support it the result could make sense.
Also this would solve mlr-org/mlr3fselect#87
The text was updated successfully, but these errors were encountered: