[ENH] set_params to recognize unique suffixes as aliases for full parameter string#229
Merged
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
+ Coverage 83.55% 83.64% +0.09%
==========================================
Files 41 41
Lines 2833 2856 +23
==========================================
+ Hits 2367 2389 +22
- Misses 466 467 +1
☔ View full report in Codecov by Sentry. |
| composite._components(SomeClass) | ||
|
|
||
|
|
||
| class AliasTester(BaseObject): |
Check failure
Code scanning / CodeQL
Missing call to `__init__` during object initialization
| composite._components(SomeClass) | ||
|
|
||
|
|
||
| class AliasTester(BaseObject): |
Check warning
Code scanning / CodeQL
`__eq__` not overridden when adding attributes
fkiraly
pushed a commit
to sktime/sktime
that referenced
this pull request
Nov 3, 2023
…r full parameter string (#2931) Update: The logic in this PR became obsolete after merging it upstreak in `scikit-base 0.6.1`, see sktime/skbase#229 The PR still adds the tests in `sktime`, with a `scikit-base` version condition, but does not add the logic anymore. --- This PR introduces experimental functionality to `set_params` to enable it to recognize unique suffixes as aliases for full parameter strings. That is, in the example in #2929, it enables `set_params` - and, in consequence, the `param_grid` of grid search - to recognize `max_depth` instead of `forecaster__forecast__estimator__max_depth`. This is primarily meant as convenience sugar for the user of grid search or, more generally, `set_params`. Contains tests for both nested parameter setting behaviour, as well as parameter key aliasing in nested composites.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Mirror of sktime/sktime#2931
This PR introduces experimental functionality to
set_paramsto enable it to recognize unique suffixes as aliases for full parameter strings.That is, in the example in sktime/sktime#2929, it enables
set_params- and, in consequence, theparam_gridof grid search - to recognizemax_depthinstead offorecaster__forecast__estimator__max_depth.This is primarily meant as convenience sugar for the user of grid search or, more generally,
set_params.Contains tests for both nested parameter setting behaviour, as well as parameter key aliasing in nested composites.