prophet
prophet copied to clipboard
Seeking clarification on setting custom holiday prior scale
*EDIT: The questions I have are specifically about this line in the docs. You can also include a column prior_scale to set the prior scale separately for each holiday, as described below.
prior_scale syntax Assuming I have a holidays dataframe as shown in the docs with an additional holiday flag called 'christmas', is the following an appropriate way to set different prior_scales?
holidays['prior_scale'] = 0.1
holidays.loc[holidays['holiday'] == 'christmas', 'prior_scale'] = 10
intended effect
The snippet from my fitted forecast below shows a consistent underestimation of the holiday effect for christmas.
Assuming the above syntax is correct, I have tried increasing the prior_scale to increase the flexibility of the 'christmas' holiday fit in hopes it will approach the actual. However, I have tried some reasonable priors (0.5, 1, 10) as well as 1000 and noticed no difference in the final effect.
Any insight would be appreciated here. Thank you.
holidays_prior_scale is a hyperparameter of the model that you set when you instantiate the Prophet model:
m = Prophet(holidays=holidays, holidays_prior_scale=0.05).fit(df)
More info here in the docs.
You don't need to set it in the dataframe. However, it will apply to all the "holidays regressors". To my knowledge, you cannot set it by type of holidays.
holidays_prior_scaleis a hyperparameter of the model that you set when you instantiate the Prophet model:m = Prophet(holidays=holidays, holidays_prior_scale=0.05).fit(df)More info here in the docs.
You don't need to set it in the dataframe. However, it will apply to all the "holidays regressors". To my knowledge, you cannot set it by type of holidays.
The docs do say "You can also include a column prior_scale to set the prior scale separately for each holiday, as described below" and "Prior scales can be set separately for individual holidays by including a column prior_scale in the holidays dataframe". There just doesn't seem to be any actual examples of this that I could find in the docs.