I am trying to figure out how to use the Python port of CausalImpact package.
In the examples notebook, there is a section on working with seasonal data.
It is still unclear to me how to define the nseasons
parameter.
In the notebook example:
ci = CausalImpact(season_data, pre_period, post_period,
nseasons=[{'period': 7, 'harmonics': 2}, {'period': 30, 'harmonics': 5}])
neasons
takes a list of dicts. I believe setting the 'period':7
is used to denote seasonality at a weekly level, and 'period':30
at a monthly level, but I'm not 100% sure. I also do not understand, however, what the harmonics
parameter represents.
The dataset I'm working with right now is the daily aggregates of sales for an online retailer. Ultimately, I would like to have the model consider the fact that seasonality can occur at the weekly, monthly, and quarterly level. How can I set the nseasons
parameter to do this?