Created
November 14, 2019 20:28
-
-
Save robsannaa/6eaf329202c1046da63927ad4ca131de to your computer and use it in GitHub Desktop.
holidays.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
summer_sales = pd.DataFrame({ | |
'holiday': 'summer_sales', | |
'ds': pd.date_range(start='1/07/2018', end='15/08/2018'), | |
'lower_window': -5, | |
'upper_window': 0, | |
}) | |
black_friday = pd.DataFrame({ | |
'holiday': 'black_friday', | |
'ds': pd.date_range(start='23/11/2018', end='23/11/2018'), | |
'lower_window': 0, | |
'upper_window': 0, | |
}) | |
christmas = pd.DataFrame({ | |
'holiday': 'christmas', | |
'ds': pd.date_range(start='15/12/2018', end='24/12/2018'), | |
'lower_window': 0, | |
'upper_window': 0, | |
}) | |
holidays = pd.concat((summer_sales, black_friday, christmas)) | |
m_holidays = Prophet(yearly_seasonality=True, weekly_seasonality=False, holidays=holidays) | |
m_holidays.add_country_holidays(country_name='IT') | |
m_holidays.fit(df_quantile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment