-
Notifications
You must be signed in to change notification settings - Fork 487
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
Improve usability for conditional seasonality #1116
Conversation
* Quarterly changing weekly seasonality
* On-season and off-season football * Adapted from Facebook Prophet
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1116 +/- ##
==========================================
+ Coverage 90.16% 90.17% +0.01%
==========================================
Files 36 36
Lines 5042 5059 +17
==========================================
+ Hits 4546 4562 +16
- Misses 496 497 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Model Benchmark
|
…ndition to the dataframe
…ndition to the dataframe
@ourownstory when you or someone else review this, please have a look at the new helper function with the pre-implmented conditional seasonalities, and evaluate whether it makes sense |
* when missing dates are added * when predicting (ffill at end)
* when missing dates are added * when predicting (ffill at end)
* when missing dates are added * when predicting (ffill at end)
* when missing dates are added * when predicting (ffill at end)
* when missing dates are added * when predicting (ffill at end)
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.
Great work!
RE:tutorial:
- mention helper functions
- explain what a condition is/must be
- plot_params: just plot Seasonalities
neuralprophet/forecaster.py
Outdated
-------- | ||
Adding a quarterly changing weekly seasonality to the model. First, add columns to df. | ||
The columns should contain only zeros and ones (or floats), deciding when to apply seasonality. | ||
>>> df["summer_week"] = df["ds"].apply(lambda x: x.month in [6, 7, 8]) |
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.
"summer_week", can drop week
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.
Looks good!
🔮 Key changes
Extends #1067
Added docstring example, a new tutorial notebook for conditional seasonality, as well as some validation for float values between 0..1 in the conditional seasonality column.
Also, added helper function to integrate four seasons and/or weekday/weekend conditions. Fixes #609
📋 Review Checklist