facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.53k stars 4.54k forks source link

The difference between using 'holidays' and 'add_regressor' when identifying a specific holiday #1491

Closed frankcui666 closed 4 years ago

frankcui666 commented 4 years ago

Hi all: I have question about the the difference when identifying a specific holiday using 'holidays' and 'add_regressor',for example: ’11-11‘ is just a big promotion day in China as the Black Friday in the US. I suppose to use some historical transaction data of a online-shopping website including '11-11' to forecast its future volume. When I set ’11-11‘ using 'holidays' and 'add_regressor', although the prediciton results of both improve a lot comparing with not setting, but the results of 'holidays' seems much better(i know it would be more clear to show the data and the results here,but because the data is a little bit sensitive, I am unauthorized to show it.sorry)

SO, I guess 'add_regressor' is more suitable for some exogenous variables. but as for a specific day, it would be better to set it into 'holidays' in order to get better prediction results.

I wonder whether my understanding above is right?Could anyone give me a explanation?Thx!

bletham commented 4 years ago

I'd like to get some more detail on what you tried. Under the hood, holidays are transformed into binary extra regressors, so you shouldn't be any difference unless there is something about how they are being configured.

Here are some questions to get at what happened: Did you use the lower_window or upper_window? Did you change the holiday_prior_scale from its default, or when you added the regressor did you specify a prior scale? Was the regressor that you added binary so that it was 1 on 11-11 and 0 otherwise? Could you double check that the dates used in the holidays dataframe are the same as those given the 1 in the extra regressor?

If you post the code you used in each setting that could be helpful too.

dharani-aws commented 4 years ago

Hi @bletham I am having a problem with add_regressor() could you please help me ? https://github.com/facebook/prophet/issues/1619

regards Dharani