facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.26k stars 4.51k forks source link

Prophet forecast amplitude is too low compared to actual data, daily seasonality is wrong. #2596

Open vladchestTELUS opened 2 months ago

vladchestTELUS commented 2 months ago

I am experiencing issues with having Prophet fit daily usage data. Based on my understanding of the data there is daily, very likely weekly and monthly (possibly annual) components. I have 90d of 15min data. The forecast is interested in next week forecast at 15 min increments. Pretty sure the data is stationary in the data I am using for testing (non stationary is also possible but currently a specific case is used to avoid that).

First when I let prophet do its own thing it does something very odd to the daily seasonality: P = Prophet() ... P.plot_components(fcast) P.plot(fcast, figsize=(60,6)) #is there a way to plot specific subregion instead of full data? image image image

The daily seasonality has way too many bumps in it. The amplitude of daily forecast is also very low. For weekly seasonality there is a large drop around wed, which seems to be exaggerated as the original data (black) has relatively same lows.

I am able to somewhat manage the daily seasonality if I force it myself: P = Prophet(daily_seasonality=False) P.add_seasonality(name="daily", period=1, fourier_order=1) #increasing fourier_order to higher number leads to multiple bumps rather than bettermatching of the data ... P.plot_components(fcast) P.plot(fcast, figsize=(60,6)) #is there a way to plot specific subregion instead of full data? image image image The data is matched closer but the amplitude of the forecast is still a big issue.

I tried adjusting # of changepoints (ie 90*10) no impact, changepoint_prior_scale set to 0.17 improves a little bit: image image image

I tried logistic growth not helpful. Setting daily seasonality to multiplicative goes too ham on the amplitude and the period is offset:

P = Prophet(daily_seasonality=False, changepoint_prior_scale=0.17) # daily_seasonality=False, weekly_seasonality=False #, weekly_seasonality=False, changepoint_prior_scale=0.17, n_changepoints=90*10
P.add_seasonality(name="daily", period=1, fourier_order=1, mode="multiplicative")

removing changepoint_prior_scale leads to worse match, fourier increase leads to more bumps

Best match with multiplicative and changepoint_prior_scale=0.17 (code above): image image image

Any suggestions as to how I can match the data better (each day is a spike)?

vladchestTELUS commented 2 months ago

small update:

P = Prophet(daily_seasonality=False, changepoint_prior_scale=0.0925) 
P.add_seasonality(name="daily", period=1, fourier_order=1, mode="multiplicative")

Is a little bit better amplitude match, but its out of sync with actual data and is off on the low part: image image image Any suggestions as to how I can match the data better (each day is a spike)?