Grid/random search forecaster using dynamic tags to check for fh#1091
Merged
Grid/random search forecaster using dynamic tags to check for fh#1091
Conversation
Collaborator
Author
|
FYI @GuzalBulatova |
Collaborator
Author
|
@GuzalBulatova, @mloning, @TonyBagnall, if you remember we went back and forth about |
This was referenced Jul 1, 2021
Collaborator
Author
|
@aiwalter, can you have a look? This relates to your change on Are there any other tags we want to mirror? All of them, perhaps? |
aiwalter
approved these changes
Aug 27, 2021
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.
This is a refactor of the below refactor.
Parts of this have now been merged as part of other PR. So in effect, this PR only makes one major change:
"requires-fh-in-fit"tag in the constructor of the grid search algorithms with the value of the single component (the tuned estimator), usingclone_tags.A minor change is docstring linting in
_tune.This is a follow-on from #1088 attempting to address the incompatibility of the grid search refactor due to its "dynamic tag like" behaviour pre-refactor.
Apologies from working with the tags here, but this naturally emerged in trying to address issues and finish the forecaster refactor.
The solution I've adopted makes the following changes to the grid search algorithms:
"requires-fh-in-fit"tag in the constructor of the grid search algorithms with the value of the single component (the tuned estimator)BaseGridSearch, completes the refactor by moving all algorithmic logic to the_fit,_predictetc interface. This includes removing the override to thecutoffgetter.The first change, the override, is achived by new dynamic tag handling (object, not class) methods in the
BaseEstimatorclass: gettersget_tags,get_tagand settersset_tagsandmirror_tags. These make use of dynamic tags that can be set in construction and override class tags and their inheritance.The one other change is replacing the tag access in
_set_fhbyget_tagso it can see the dynamic tag override.