Prophet: Custom holidays not showing in components plot or forecast dataframe

Created on 26 Aug 2020  Â·  4Comments  Â·  Source: facebook/prophet

Custom holidays not showing in components plot or forecast dataframe when running the Peyton Manning example, with playoff and superbowl events.

Running the following package versions, python 3.8.5 MacOS:

pandas==1.1.1
matplotlib==3.3.1
holidays==0.10.3
fbprophet==0.6

Running the following Peyton Manning Holidays notebook from the master repo shows a components plot with no forcings on the holiday component, and all values are zeroes in the holidays, playoff and superbowl columns.

https://github.com/facebook/prophet/blob/master/notebooks/seasonality,_holiday_effects,_and_regressors.ipynb

This does not seem to be expected behaviour - and doesn't match the plots produced in the web-hosted notebook.

Most helpful comment

Thank you for the swift reply @bletham ! Looking forward to the fixed version on PyPI, thanks again for acting quickly on this! Will try and pandas downgrade, appreciate the pointer and reference to existing ticket!

All 4 comments

The issue here is a breaking change in pandas 1.1.0 that broke the holidays functionality (more discussion in #1617).

The issue has been fixed in the current code here on github, so if you install this, it will work. We're in the process of pushing out the fixed version to PyPI, so you will be able to install it from there very soon. Alternatively, if you downgrade pandas to 1.0.5 then it will work with the current pypi version (0.6).

Thank you for the swift reply @bletham ! Looking forward to the fixed version on PyPI, thanks again for acting quickly on this! Will try and pandas downgrade, appreciate the pointer and reference to existing ticket!

The issue here is a breaking change in pandas 1.1.0 that broke the holidays functionality (more discussion in #1617).

The issue has been fixed in the current code here on github, so if you install this, it will work. We're in the process of pushing out the fixed version to PyPI, so you will be able to install it from there very soon. Alternatively, if you downgrade pandas to 1.0.5 then it will work with the current pypi version (0.6).

Is there a fix other than enforcing pandas to be 1.0.5 as was done in #1623? I need pandas 1.1, so I would not be able to use fbprophet then.

The fix has been pushed to pypi in the new v0.7, so upgrading fbprophet will take care of it!

Was this page helpful?
0 / 5 - 0 ratings