Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fbprophet yearly seasonality values too high

I have recently started using fbprophet package in python. I have monthly data for last 2 years and forecasting for next 9 months. Since, I have monthly data I have only included yearly seasonality (Prophet(yearly_seasonality = True)). When I plot components, trend values seem to be fine however, Yearly seasonality values are too high, I don't understand why? Seasonality is showing 300 increase or -200 decrease. However, in actual graph it is not happening in any months in the past - what I can do to correct? Overall Forecast

Trend

Seasonality

Code Used is as follows:

m = Prophet(yearly_seasonality = True)
m.fit(df_bu_country1)
future = m.make_future_dataframe(periods=9, freq='M')
forecast = m.predict(future)
m.plot(forecast)
m.plot_components(forecast)
like image 446
rishi jain Avatar asked Dec 05 '25 23:12

rishi jain


2 Answers

There is no seasonality at all in your data. For there to be yearly seasonality, you should have a pattern that repeats year after year, but the shape of your time series from 10/2015 to 10/2016 is completely different from the shape between 10/2016 to 10/2017. So forcing a yearly seasonality is going to give you strange results, you should switch it off (i.e. just use Prophet's default settings).

like image 126
Alex Kinman Avatar answered Dec 08 '25 11:12

Alex Kinman


There is an inconsistency in the seasonality factor of your data, there seems a little yearly seasonality between 2017-04 to 2018-10 . The first answer is absolutely true but incase if you feel there some seasonality you can reduce its impact by altering fourier order it has. https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#fourier-order-for-seasonalities

This page has how to do so, the default fourier order is 10, reducing the values cahnges it effects. Try this hope it helps you

like image 25
Sandeep Chowdary Avatar answered Dec 08 '25 12:12

Sandeep Chowdary



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!