Time Series Python : "Key Error" `start` argument could not be matched

Viewed 1573

I have trained data set with ARIMA model ,while predicting I am struggling with below error.

  • KeyError: 'The start argument could not be matched to a location related to the index of the data.'

train and valid indicate trainning and validation data set..

Code:
model = ARIMA(train, order=(2, 0, 0))
model_fit = model.fit(disp=1)

start_index = valid.index.min()
end_index = valid.index.max()

#Predictions
predictions = model_fit.predict(start=start_index, end=end_index)
2 Answers

This error comes when there is missing value against date time in train data.

May be you could find some NA values in the data set. Filling those data points might get rid of the error.

Related