2

Why we are getting this error when we predict or forecast using Statsmodels " SARIMAX "?. I am just passing the start and end of Index and steps that need to take into consideration.

Either use the below line to execute: 

results = model.fit()
predictions= results.predict(start =train_size, end=train_size+test_size+(steps)-1)
(Or)
forecast_= results.forecast(steps=test_size-1)

Is there any proper way to neglect the warning message?

**

Want to understand in detail the warning. Hope will get it.

**.

Devendran
  • 21
  • 1
  • 4

4 Answers4

0

I had the same problem. What I have observed in my case is, in the series of Date or Datetime data I had, some days were missing. For e.g. I am looking into support ticket volume prediction and I had no tickets on the day of Christmas hence 25th December was missing in my data. That gap caused the issue. So, I took my start date and tried to put all dates in scope, in Excel (you mention 2 or 3 consecutive days and then drag down the column, easy) and found that I had total 5 days missing. Once I used the suggestion provided in below link, I got out of the problem.

Fill the missing date values in a Pandas Dataframe column

Note: Once you do the ffill or bfill, the date index becomes another column. So, you set date index again.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Noel
  • 57
  • 4
0

Same here - but for me there was no missing data in the index. Everything worked fine in the previous release. After I changed the indexing from a timestamp to normal, integer values the problem disappeared. Has to do with timestamp somehow.

happ
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 05 '22 at 19:09
0

It has to do with non-integer indexes. It worked for me when I ran :

model = sm.OLS(y.values).fit()
model.forecast(steps = 1)
Gcedism
  • 23
  • 5
0

In my case, there was a duplicated datetime index in data. When I removed that duplicated datetime, the warning is disappeared.

Heedo Lee
  • 59
  • 3