Skip to content

Commit afa1938

Browse files
authored
Add cap to seasonal period to include decomposition (#4147)
* Add cap to _get_decomposer * Release notes * Add test * Move cap to be constant
1 parent 83cfac8 commit afa1938

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

docs/source/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Release Notes
88
* Fixed usage of codecov after uploader deprecation :pr:`4144`
99
* Fixed issue where prediction intervals were becoming NaNs due to index errors :pr:`4154`
1010
* Changes
11+
* Capped size of seasonal period used for determining whether to include STLDecomposer in pipelines :pr:`4147`
1112
* Documentation Changes
1213
* Testing Changes
1314

evalml/pipelines/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
from evalml.utils.cli_utils import get_evalml_black_config
7373
from evalml.utils.gen_utils import contains_all_ts_parameters
7474

75+
DECOMPOSER_PERIOD_CAP = 1000
76+
7577

7678
def _get_label_encoder(X, y, problem_type, estimator_class, sampler_name=None):
7779
component = []
@@ -241,7 +243,7 @@ def _get_decomposer(X, y, problem_type, estimator_class, sampler_name=None):
241243
y,
242244
rel_max_order=order,
243245
)
244-
if seasonal_period is not None:
246+
if seasonal_period is not None and seasonal_period <= DECOMPOSER_PERIOD_CAP:
245247
components.append(STLDecomposer)
246248
return components
247249

evalml/tests/pipeline_tests/test_pipeline_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def test_make_pipeline(
218218
("YS", 6, True),
219219
("Q", 4, True),
220220
("Q", 2, False),
221+
("D", 1500, False),
221222
(None, None, False),
222223
],
223224
)

0 commit comments

Comments
 (0)