Amit
Amit

Reputation: 327

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

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

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)

Upvotes: 2

Views: 2737

Answers (2)

Hussain
Hussain

Reputation: 308

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

Upvotes: 1

Amit
Amit

Reputation: 327

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

Upvotes: 1

Related Questions