2

im currently trying to build a good forecast on Hourly Based Data with Python and Prophet.

After cleaning all the data and resampling missing values, i already got a much better result. I also included cap and floor and a own changepoint_prior_scale.

When i plot the prediction result over the actual data it fits until there are peaks. Could anybody give me tips to make prophet predict these peaks in July better ?

It seems like the peaks are there but to low.

Here is the part of my code to generate the model and predict the future:

df['cap']=130
df['floor']=0
model = Prophet(changepoint_prior_scale=0.1, growth='logistic').fit(df)
future = model.make_future_dataframe(periods=15*24, freq='H')
future['cap']=130
future['floor']=0
forecast = model.predict(future)
plot1 = model.plot(forecast)

And here is a image of the plot: Plot seems quite good in overall trend but peaks on July are not high enough

R. Keller
  • 100
  • 7

1 Answers1

0

I will suggest you to start with looking on the components of the forecast (trend, seasonality) to get the overview of the model. You can do this using:

m.plot_components(forecast)

In your model you are using only changepoint_prior_scale greater than default (0.05) what means that you enable trend to be more flexible.

It will be worth to play with different seasonality parameters - for example try to smooth yearly seasonality adding to the model parameters yearly_seasonality=20 (10 by default).

Knowing that in July you have always the peak, you can try also to use Prophet holiday effect - which is well described here.

annabitel
  • 112
  • 1
  • 1
  • 11