2

could you, please, help me: I don't know how to add hourly seasonality in Facebook Prophet in Python. I tried the following:

m = Prophet(
            weekly_seasonality = True, 
            yearly_seasonality = True, 
            daily_seasonality = True
            )

m.fit(train_df)
future = m.make_future_dataframe(periods=24, freq = 'H')
forecast = m.predict(future)

But it didn't help me. The results were strange. Maybe you know the solution how to add both daily, weekly etc and hourly seasonality?

  • The code looks ok. Can you share the plot of the data and plot_components output? It is hard to say what is wrong here and what do you mean by 'strange output'. Maybe model settings are not appropriate for your timeseries - there is more to adjust in Prophet model than just seasonality. – annabitel Feb 26 '22 at 20:30

1 Answers1

0

Just check a docs. So basically you need to create a custom seasonality with a proper period. E.g. if you have a step 1 day your hourly seasonality will be with period 1/24

Sergey Pryvala
  • 506
  • 4
  • 6