fbprophet how to adapt the date of my data to the prediction date and cross-validation

24 views Asked by At

Here's the data from my dataframe,

|   GG   |   Dates   |
|--------|-----------|
|2.575839| 2014-01-01|
|2.266158| 2014-02-01| 
|2.493514| 2014-03-01| 
|2.530145| 2014-04-01| 
|2.650693| 2014-05-01| 

I have 120 rows, I want to train the model on all my data to get the best possible prediction and measure the accuracy of this model. If I've understood correctly, fbprophet doesn't need to be split into training and test sets.

It's a time series where the data is represented by month and not by day, unlike what I'm used to seeing.

I would like to make a prediction for the period 2024 to 2026

Here are the steps I've followed, but I've got the feeling I'm going the wrong way.

Prophet_df=df.rename(columns={'Dates':'ds','GG':'y'})
m = Prophet()
m.fit(Prophet_df)
future=m.make_future_dataframe(periods=36,freq='M')
forecast=m.predict(future)

cross validation:

df_cv = cross_validation(m, initial='730 days', period='180 days', horizon = '365 days')

Kindly assist me

I tried:

df_cv = cross_validation(m, initial='72 months', period='24 months', horizon = '36 months')

But it does not consider months as a unit.

0

There are 0 answers