Hello, I have hourly data with daily seasonality. How would one go about including holiday effects like Christmas day? There is a marked increase in value on holidays like Christmas.
If the holiday is specified with the usual holidays interface, then it will add a constant offset for the entire day. I imagine for hourly data you probably have some shape other than constant to the actual holiday effect. If you want to allow the holiday effect on Christmas to have a generic shape (like daily seasonality), then you can use a masked seasonality. Basically what you will do is define a "ChristmasSeasonality" that is a daily seasonality but only for Christmas. See the documentation here: https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#seasonalities-that-depend-on-other-factors
It would look like
m.add_seasonality(
name='ChristmasSeasonality',
period=1, # 1-day period
fourier_order=4, # This is the default for the built-in daily seasonality
condition_name='is_Christmas',
)
and you would add a binary column to your history and future dataframes that is 0 if the ds is not on Christmas, and 1 if it is on Christmas.
When you generate the components plot, it will have a panel for the ChristmasSeasonality that will show the effect applied to every Christmas.
Most helpful comment
If the holiday is specified with the usual holidays interface, then it will add a constant offset for the entire day. I imagine for hourly data you probably have some shape other than constant to the actual holiday effect. If you want to allow the holiday effect on Christmas to have a generic shape (like daily seasonality), then you can use a masked seasonality. Basically what you will do is define a "ChristmasSeasonality" that is a daily seasonality but only for Christmas. See the documentation here: https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#seasonalities-that-depend-on-other-factors
It would look like
and you would add a binary column to your history and future dataframes that is 0 if the ds is not on Christmas, and 1 if it is on Christmas.