Skip to content

Update _get_decomposer to use stripped freq#3794

Merged
eccabay merged 7 commits intomainfrom
stl_t_error
Oct 28, 2022
Merged

Update _get_decomposer to use stripped freq#3794
eccabay merged 7 commits intomainfrom
stl_t_error

Conversation

@eccabay
Copy link
Copy Markdown
Contributor

@eccabay eccabay commented Oct 28, 2022

Fixes bug where any invalid frequencies that were either offset (i.e. 10 minutes -> 10T) or anchored (annually at the year end -> A-DEC) were not properly getting excluded from training with the decomposer.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 28, 2022

Codecov Report

Merging #3794 (e4f807b) into main (8526d9b) will not change coverage.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main   #3794   +/-   ##
=====================================
  Coverage   99.7%   99.7%           
=====================================
  Files        343     343           
  Lines      35797   35797           
=====================================
  Hits       35660   35660           
  Misses       137     137           
Impacted Files Coverage Δ
evalml/pipelines/utils.py 99.6% <100.0%> (ø)
evalml/tests/pipeline_tests/test_pipeline_utils.py 99.8% <100.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@eccabay eccabay marked this pull request as ready for review October 28, 2022 19:42
Copy link
Copy Markdown
Collaborator

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

from evalml.utils.gen_utils import contains_all_ts_parameters

_UNSUPPORTED_FREQUENCIES_STL_DECOMPOSER = ["A", "T"]
_UNSUPPORTED_FREQUENCIES_STL_DECOMPOSER = ["A", "Y", "T", "AS", "YS"]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference: A and Y are both year end, AS and YS are year start, T is minute

Copy link
Copy Markdown
Contributor

@chukarsten chukarsten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking comments, but looks good. I do think each decomposer module should be cognizant of what frequencies are no bueno for it. And I'll leave it up to you whether you think the child-decomposer class has a method to return that.

Comment on lines +200 to +210
"frequency, should_decomp",
[
("D", True),
("MS", True),
("A", False),
("T", False),
("10T", False),
("AS-JAN", False),
("YS", False),
],
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is going to be on a per-decomposer basis...so we might need to do this differently going forward, when we introduce new decomposers and also introduce new ways of trying more pipelines with different decomposers. I think it's fine for now and we can kick the can to when we do X11 or X13.

Could we also add mention that this is a test for time series only in the test name?

from evalml.utils.gen_utils import contains_all_ts_parameters

_UNSUPPORTED_FREQUENCIES_STL_DECOMPOSER = ["A", "T"]
_UNSUPPORTED_FREQUENCIES_STL_DECOMPOSER = ["A", "Y", "T", "AS", "YS"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to move this either 1.) into the stl_decomposer module and/or 2.) make it returnable by the decomposer itself. Then we can dynamically know what decomposers support or do not. You could also build the parametrization list and parametrize across STL decomposers in your decomposer test that way.

Part of the motivation behind the move, in my mind, is the answer to "where should I go to find what frequencies are not supported by X Decomposer?"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lovely idea - filed #3795 to track this!

@eccabay eccabay enabled auto-merge (squash) October 28, 2022 20:19
@eccabay eccabay merged commit b5eb7b0 into main Oct 28, 2022
@eccabay eccabay deleted the stl_t_error branch October 28, 2022 20:47
@chukarsten chukarsten mentioned this pull request Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants