Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split STL seasonal_period into separate seasonal_smoother and period #3896

Merged
merged 5 commits into from
Dec 21, 2022

Conversation

eccabay
Copy link
Contributor

@eccabay eccabay commented Dec 19, 2022

Currently, in evalml/stl_decomposer.py at main · alteryx/evalml, the STLDecomposer mistakenly takes a value for seasonal and passes it to the seasonal parameters of the underlying STL algorithm. It seems that seasonal is actually a value for a window that does smoothing (possibly for the trend decomposition). This fixes that by splitting the seasonal_period parameter into separate seasonal_smoother (ideally a clearer name for this parameter) and period

@codecov
Copy link

codecov bot commented Dec 19, 2022

Codecov Report

Merging #3896 (f5c7333) into main (e6b837a) will increase coverage by 0.1%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main   #3896     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        346     346             
  Lines      36639   36640      +1     
=======================================
+ Hits       36509   36510      +1     
  Misses       130     130             
Impacted Files Coverage Δ
...sts/decomposer_tests/test_polynomial_decomposer.py 100.0% <ø> (ø)
...omponents/transformers/preprocessing/decomposer.py 99.3% <100.0%> (+0.1%) ⬆️
...ransformers/preprocessing/polynomial_decomposer.py 100.0% <100.0%> (ø)
...nents/transformers/preprocessing/stl_decomposer.py 100.0% <100.0%> (ø)
...omponent_tests/decomposer_tests/test_decomposer.py 99.7% <100.0%> (ø)
...nent_tests/decomposer_tests/test_stl_decomposer.py 100.0% <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 enabled auto-merge (squash) December 21, 2022 21:10
@eccabay eccabay merged commit dc4b0f6 into main Dec 21, 2022
@eccabay eccabay deleted the 5963_stl_period branch December 21, 2022 21:36
Comment on lines +32 to +36
def test_stl_raises_warning_high_smoother(caplog, ts_data):
X, _, y = ts_data()
stl = STLDecomposer(seasonal_smoother=101)
stl.fit(X, y)
assert "STLDecomposer may perform poorly" in caplog.text
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect the behavior we want here is actually to warn off the period rather than the seasonal_smoother parameter here.

@christopherbunn christopherbunn mentioned this pull request Jan 3, 2023
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.

4 participants