'ARIMA for prediction for future trends in Python
I'm trying to fit ARIMA model to predict the future trends in the data. The dataset has 500 data points. Every time the model predicts a data, it has to consider the pre-existing data and append the predicted data to the pre-existing array. For example, if I want 503rd data, 501 and 502nd data must be appended to the initial array and the model should be fit thrice.
I've used the following code and I'm unsure where the mistake is. The problem I'm facing is that after a certain prediction, the predicted value doesn't change at all.
def iterate(x):
i = 0
predictions = list()
while i < 520:
i = i+1
predictions = model_fit.predict(start= i ,end=i+1)
x.append(predictions)
print(predictions)
return predictions
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
