Creating multi-day holidays
Sometimes, a holiday or other special event will span several days. Fortunately, Prophet includes functionality to handle these scenarios via the window
arguments. The holidays
DataFrame we have been building to populate our holidays in the previous examples can include the optional columns of 'lower_window'
and 'upper_window'
. These columns specify additional days either before or after the main holiday that Prophet will model.
For example, in the previous example, we modeled Christmas and Christmas Eve as two different holidays. Another method would have been just to model Christmas but include a 'lower_window'
argument of 1
, telling Prophet to include a single day before Christmas as part of the holiday. This assumes, of course, that Christmas Eve will always fall on the day before Christmas. If, however, Christmas Eve were a holiday that floated and did not always fall immediately before Christmas, this window
method...