FIX Backwards SequentialFeatureSelector
always drops one feature
#26480
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Closes #26369
What does this implement/fix? Explain your changes.
This is an attempt at closing the issue. It uses the "all features selected" cross val score as the starting value instead of
-inf
for backwards selection.I also changed the forward selection starting value to0
, I think scores have to be between zero and one?!I also had to update the tests after this change, so I am not sure the changes are correct. (Maybe the test was wrong, but maybe not?)
This is just a draft/way to store this work in progress somewhere and lets others see it. Maybe someone wants to take on this PR.
Any other comments?
There is code to reproduce the problem in the original issue. It could be a good starting point for making a non-regression test.