-
Notifications
You must be signed in to change notification settings - Fork 87
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
STL Decomposer #3741
STL Decomposer #3741
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3741 +/- ##
=======================================
- Coverage 99.7% 99.7% -0.0%
=======================================
Files 341 343 +2
Lines 35287 35681 +394
=======================================
+ Hits 35155 35545 +390
- Misses 132 136 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
43ba31b
to
e38c45e
Compare
…different classes. Moved the test to project the seasonal signal up to the parent Decomposer class. Moved the testing for the seasonal projection to the decomposer test module.
… to move that up to the base Decomposer class.
* Updated get_trend_df() to work out of sample. * Fixed transform() to work with in sample, but not spanning the sample. * Fixed inverse_transform to work with smaller than sample, in sample data.
…ple. Also updated test for transform to return same if y is None and moved that to parent class.
…etter reflect what's going on. Docstring changes.
…e seasonal sample to match the STLDecomposer.
b7c65ef
to
a13b547
Compare
… bug in forecasting the trend
…ynomialDecomposer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic 🚢 What beasts of tests these are.
evalml/pipelines/components/transformers/preprocessing/polynomial_decomposer.py
Outdated
Show resolved
Hide resolved
evalml/pipelines/components/transformers/preprocessing/polynomial_decomposer.py
Show resolved
Hide resolved
evalml/pipelines/components/transformers/preprocessing/stl_decomposer.py
Show resolved
Hide resolved
if not isinstance(X.index, pd.DatetimeIndex): | ||
raise TypeError("Provided X should have datetimes in the index.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to continue enforcing this? We can set it within this function relatively easily.
dec.set_seasonal_period(X, y) | ||
|
||
assert 0.95 * period <= dec.seasonal_period <= 1.05 * period | ||
assert dec.parameters["seasonal_period"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this purposely just checking that the parameter exists? Should we be checking its value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, yes, this one is a bug. For some reason, parameters dict value is not being set. I tried fixing it, but for some reason cannot get it to set. I filed this to look at it later given that we don't even use set_seasonal_period
.
evalml/tests/component_tests/decomposer_tests/test_polynomial_decomposer.py
Outdated
Show resolved
Hide resolved
assert stl.seasonal_period == 5 | ||
|
||
|
||
def build_test_target(subset_y, seasonal_period, transformer_fit_on_data, to_test): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth it to move to conftest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is! This is actually handled in this parity PR and will shift up to the test_decomposer.py
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - amazing effort!
* cap featuretools * RL * Cap nlp primitives as well * Fix conda
I got the chance to play around with it and I think it looks and works great, fantastic job! |
praise god |
Decompose things...STL'ly!