You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ENH] Add second FeatureSelection test parameter set - #10232
What does this implement/fix? Explain your changes.
This adds a second lightweight test parameter set for FeatureSelection and removes it from the test_get_test_params_coverage exclusion list.
The additional parameter set uses method="feature-importances" with n_columns=2. This exercises the supervised feature-importance branch without adding a soft dependency or expensive fitting.
Does your contribution introduce a new dependency? If yes, which one?
No.
What should a reviewer concentrate their feedback on?
Whether the feature-importance configuration is an appropriate second lightweight test parameter set for FeatureSelection.
method="none" doesn't pass the suite. running check_estimator(FeatureSelection) with these params gives 4 failures, all on param set 1:
test_fit_transform_output: FeatureSelection.transform should return an object of
scitype Series when given an input of scitype Series, but found the following
return: None
test_fit_idempotent / test_persistence_via_pickle / test_save_estimators_to_file:
unsupported operand type(s) for -: 'NoneType' and 'NoneType'
"none" returns None from transform by design, so the boilerplate can't take it as a Series.
{"method": "feature-importances", "n_columns": 2} passes all 80 checks and exercises the regressor path instead of the passthrough.
also worth a rebase, the _config.py hunk is against a stale main (DontUpdate is no longer in that list).
Thanks for catching this. I reproduced the four failures with method="none" and confirmed that the None output is incompatible with the estimator checks.
I rebased onto the current main, replaced the second parameter set with {"method": "feature-importances", "n_columns": 2}, and kept the config change limited to removing FeatureSelection from the coverage exclusion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enhancementAdding new functionalitymodule:transformationstransformations module: time series transformation, feature extraction, pre-/post-processing
3 participants
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
Part of #3429.
What does this implement/fix? Explain your changes.
This adds a second lightweight test parameter set for
FeatureSelectionand removes it from thetest_get_test_params_coverageexclusion list.The additional parameter set uses
method="feature-importances"withn_columns=2. This exercises the supervised feature-importance branch without adding a soft dependency or expensive fitting.Does your contribution introduce a new dependency? If yes, which one?
No.
What should a reviewer concentrate their feedback on?
Whether the feature-importance configuration is an appropriate second lightweight test parameter set for
FeatureSelection.Did you add any tests for the change?
check_estimator(FeatureSelection)-> total=80, failed=0TestAllObjects().run_tests(FeatureSelection, tests_to_run="test_get_test_params_coverage")-> total=1, failed=0ruff check sktime/transformations/feature_selection.py sktime/tests/_config.py-> All checks passed