facebook / facebook/prophet

Prophet unable to learn Conditional monthly seasonality

Open
#2,408 4 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

Hi,

I have a 5 year daily level time series data of a business metric having weekly, yearly and monthly seasonality (the metric at start of month is highest and it keeps on falling as month progresses).

We were using standard 30.5 period to learn monthly seasonality, but it turns out that as the data progresses the month start peak is getting shifted every time feb comes (feb being 28/29 days and seasonality period used is 30.5).
The month start peak from march onwards will get shifted to 4th or 5th. Similar to this issue #1372 . (We have flags at month start and month end as suggested in this thread)

To rectify this issue, we tried conditional monthly seasonality i.e having different monthly seasonality for months having different no of days.

So in total added 4 different conditional monthly seasonality instead of 1 normal monthly, based on whether the month is 28, 29 , 30 or 31 day.
Similarly created 2 conditional yearly seasonality based on whether year is 365 or 366 days long.

But model was not able to learn these new monthly pattern and it performed very poor as compared to 30.5 seasonality period.

Attaching the seasonality components learnt by model (the component should start from highest and decrease as month progresses)

image
image

Please let me know if there is something wrong in this idea and in general what are the best practice to handle monthly seasonality.

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.