I have an hourly training data set that is from 04/11/16 (00:00 AM) - 10/11/16 (00:00 AM) which shows some value of moisture. I am trying to predict the next 24 hours of data (for an entire day of 11/11) using this trained data set by utilizing the FB prophet prediction model.
However, I see that when I use the pre-existing function prophet() with my data set, the ds in my data frame gets shifted back by 12 hours, therefore giving me an incorrect prediction for the next 24 hours. (Leading to my final 24 hour forecast set to be from 10/11 (12:00) - 11/11 (12:00) instead of 11/11 (00:00) - 11/11 (23:00))
How do I fix this? I am very new to using this model so I don't have a clue where I am going wrong,
Please find more details below. any help here is appreciated!
For Example :
My given data is as below :
ds | y
|
2016-11-04 00:00:13 | 19.002
2016-11-04 01:00:13 | 18.969
2016-11-04 02:00:13 | 18.963
2016-11-04 03:00:12 | 18.907
but after applying the prophet() function to this data, the $history of my result starts from
$history
**2016-11-03 13:00:13** | 19.002
**2016-11-03 14:00:13** | 18.969
**2016-11-03 15:00:13** | 18.963
**2016-11-03 16:00:12** | 18.907
A snippet of my code:
m <- prophet(training_df)
message("M value:")
print(m)
future <- make_future_dataframe(m,periods=24,freq = 3600)
forecast <- predict(m, future)
message("Forecasted data: \n ")
print( forecast[c('ds', 'yhat', 'yhat_lower', 'yhat_upper')])