facebook / facebook/prophet

[Question] Can some dates be define as different holidays?

Open
#2,381 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

I'm new to the Prophet model. I was wondering is it accept to define a date as multiple holidays? will it cause any issue?

For example, Jan 1st is the holiday [new_year], but it also is [begin_of_the_month]. It also could be a day of 7-day promotion. Not sure how Prophet model handle this situation.

Sample code to define holidays:
new_year= pd.DataFrame({
'holiday': 'new_year',
'ds': pd.to_datetime(['2022-01-01', '2023-01-01']),
'lower_window': 0,
'upper_window': 0,
})

begin_of_month= pd.DataFrame({
'holiday': 'begin_of_month',
'ds': pd.to_datetime(['2022-01-01', '2022-02-01', '2022-03-01','2022-04-01', '2022-05-01', '2022-06-01','2022-07-01', '2022-08-01', '2022-09-01','2022-10-01', '2022-11-01', '2022-12-01', '2023-01-01', '2023-02-01', '2023-03-01','2023-04-01', '2023-05-01']),
'lower_window': 0,
'upper_window': 3,
})

promotion= pd.DataFrame({
'holiday': 'promotion',
'ds': pd.to_datetime(['2022-01-01']),
'lower_window': 0,
'upper_window': 7,
})

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.