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

Support for holidays of multiple countries #1001

Merged
merged 15 commits into from
Dec 7, 2022

Conversation

leoniewgnr
Copy link
Collaborator

@leoniewgnr leoniewgnr commented Nov 29, 2022

πŸ‘¨β€πŸ”¬ Status quo
Currently it is only possible to consider holidays of one country. If another country is added, the previous one is overwritten. Addresses issue #763

πŸ‘¨β€πŸŽ¨ Key changes
It is possible now to add a list of countries, whose holidays should be considered. For example m.add_country_holidays(country_name = ["US", "Germany"]) will consider holidays of the US and Germany. For redundant holidays (here: 'Christmas Day' and 'Erster Weihnachtstag') the name of the last mentioned country will be kept (here: 'Erster Weihnachtstag')

πŸ•΅οΈβ€β™‚οΈ Review Checklist

  • I have performed a self-review of my own code.
  • I have commented my code, added Docstrings and data types to function definitions.
  • My code follows the style guidelines described under CONTRIBUTING.md.
  • I have added pytests to check whether my feature / fix works
  • All gh actions pass or the failure is not related to my code.

@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2022

Codecov Report

Merging #1001 (88764b4) into main (dcad17c) will increase coverage by 0.01%.
The diff coverage is 80.95%.

@@            Coverage Diff             @@
##             main    #1001      +/-   ##
==========================================
+ Coverage   90.26%   90.28%   +0.01%     
==========================================
  Files          21       21              
  Lines        4736     4744       +8     
==========================================
+ Hits         4275     4283       +8     
  Misses        461      461              
Impacted Files Coverage Ξ”
neuralprophet/forecaster.py 88.44% <ΓΈ> (ΓΈ)
neuralprophet/time_dataset.py 94.54% <80.00%> (+0.10%) ⬆️
neuralprophet/utils.py 82.73% <81.81%> (+0.15%) ⬆️

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

Copy link
Collaborator

@noxan noxan left a comment

Choose a reason for hiding this comment

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

Great work, looks very good to me overall. I've added a few minor suggestions and there are a few flake8 warnings which you should look at (one of them is actually critical as the variable name is not defined). Nothing big, you're on a good track, keep it up πŸ‘

neuralprophet/time_dataset.py Outdated Show resolved Hide resolved
neuralprophet/utils.py Outdated Show resolved Hide resolved
neuralprophet/utils.py Outdated Show resolved Hide resolved
tests/test_unit.py Outdated Show resolved Hide resolved
@noxan noxan added the status: needs update PR has outstanding comment(s) or PR test(s) that need to be resolved label Nov 30, 2022
leoniewgnr and others added 5 commits November 30, 2022 20:46
Co-authored-by: Richard Stromer <noxan@users.noreply.github.com>
corrected type in docstring

Co-authored-by: Richard Stromer <noxan@users.noreply.github.com>
Copy link
Collaborator

@noxan noxan left a comment

Choose a reason for hiding this comment

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

LGTM - I've added two minor suggestions which I'd add before merging and one note about duplicate code which we could extract to a helper function

neuralprophet/forecaster.py Outdated Show resolved Hide resolved
neuralprophet/utils.py Outdated Show resolved Hide resolved
neuralprophet/time_dataset.py Show resolved Hide resolved
@noxan noxan marked this pull request as ready for review December 2, 2022 05:37
leoniewgnr and others added 3 commits December 3, 2022 16:33
consistent naming of types in docstring

Co-authored-by: Richard Stromer <noxan@users.noreply.github.com>
consistent naming of types string -> str

Co-authored-by: Richard Stromer <noxan@users.noreply.github.com>
@noxan noxan added status: ready PR is ready to be merged and removed status: needs update PR has outstanding comment(s) or PR test(s) that need to be resolved labels Dec 7, 2022
@noxan noxan merged commit 20c1835 into ourownstory:main Dec 7, 2022
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

20c1835

Model Benchmark

Benchmark Metric main current diff
AirPassengers MAE_val 15.2698 15.2698 0.0% βœ…
AirPassengers RMSE_val 19.4209 19.4209 0.0% βœ…
AirPassengers Loss_val 0.00195 0.00195 0.0% βœ…
AirPassengers RegLoss_val 0 0 0.0% βœ…
AirPassengers epoch 89 89 0.0% βœ…
AirPassengers MAE 9.82902 9.82902 0.0% βœ…
AirPassengers RMSE 11.7005 11.7005 0.0% βœ…
AirPassengers Loss 0.00056 0.00056 0.0% βœ…
AirPassengers RegLoss 0 0 0.0% βœ…
AirPassengers time 4.51 4.49 -0.44% βœ…
AirPassengers system_performance 0.8028 0.7978 -0.62% βœ…
AirPassengers system_std 0.00306 0.00248 -18.95% βœ…
PeytonManning MAE_val 0.64636 0.64636 0.0% βœ…
PeytonManning RMSE_val 0.79276 0.79276 0.0% βœ…
PeytonManning Loss_val 0.01494 0.01494 0.0% βœ…
PeytonManning RegLoss_val 0 0 0.0% βœ…
PeytonManning epoch 37 37 0.0% βœ…
PeytonManning MAE 0.42701 0.42701 0.0% βœ…
PeytonManning RMSE 0.57032 0.57032 0.0% βœ…
PeytonManning Loss 0.00635 0.00635 0.0% βœ…
PeytonManning RegLoss 0 0 0.0% βœ…
PeytonManning time 11.73 11.74 0.09% βœ…
PeytonManning system_performance 0.792 0.7874 -0.58% βœ…
PeytonManning system_std 0.00063 0.00049 -22.22% βœ…
YosemiteTemps MAE_val 1.72949 1.72949 0.0% βœ…
YosemiteTemps RMSE_val 2.27386 2.27386 0.0% βœ…
YosemiteTemps Loss_val 0.00096 0.00096 0.0% βœ…
YosemiteTemps RegLoss_val 0 0 0.0% βœ…
YosemiteTemps epoch 84 84 0.0% βœ…
YosemiteTemps MAE 1.45189 1.45189 0.0% βœ…
YosemiteTemps RMSE 2.16631 2.16631 0.0% βœ…
YosemiteTemps Loss 0.00066 0.00066 0.0% βœ…
YosemiteTemps RegLoss 0 0 0.0% βœ…
YosemiteTemps time 92.45 93.12 0.72% βœ…
YosemiteTemps system_performance 0.8114 0.7964 -1.85% βœ…
YosemiteTemps system_std 0.00224 0.00196 -12.5% βœ…
Model training plots

Model Training

PeytonManning

YosemiteTemps

AirPassengers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for multiple countries holidays
6 participants