Prophet Parameters

986 views Asked by At

I am currently using Prophet to forecast usage in a year period. This is my first time using this algo and I have some questions in mind. I am utilising the code attached below. I am wondering if anyone has included holidays as parameter before and how to do so while including holidays from other calendar (lunar/islamic etc). Also since February may have 1 more day in a leap year, would be great as well to know if the algorithm take this into consideration?

 m = Prophet(
   growth='logistic', 
    seasonality_mode='multiplicative', 
    seasonality_prior_scale=1.5, 
    mcmc_samples=5,
    n_changepoints=25, 
    changepoint_range=0.8, 
    yearly_seasonality='auto',
    weekly_seasonality='auto',
    daily_seasonality='auto',
    holidays=None,
    holidays_prior_scale=10.0,
    changepoint_prior_scale=0.05,
    interval_width=0.8, 
    stan_backend=None,
    )
1

There are 1 answers

0
Akash sharma On

The holidays parameter takes in a dataframe. The minimal set of columns required in that dataframe are date and holiday name.

The important thing to note here is that you provide both historical and future holidays in this dataframe.

Apart from the 2 columns mentioned above, the following columns are optional:

  1. lower_window, upper_window (int) - to extend holiday effect around the date of holiday.
  2. prior_scale(float) - to set a different prior scale for each holiday.

Also to answer your second question i.e.

Also since February may have 1 more day in a leap year, would be great as well to know if the algorithm take this into consideration?

It depends on the modelling data. Since the data you'd be providing would already include leap year, Prophet will take that into consideration.