I'm running this code using sm.tsa.arima.ARIMA on my time series data
model = sm.tsa.arima.ARIMA(df.Sales, order=(1,1,1))
model_fit = model.fit()
print(model_fit.summary())
# Actual vs Fitted
model_fit.plot_predict(dynamic=False)
plt.show()
When I tried to plot the results, it gave me this error:
'ARIMAResults' object has no attribute 'plot_predict'
My version of statsmodels.__version__ is '0.13.2'
Statsmodels version 13 removed the .plot_predict() method from the ARIMA classes. Hence, you only need to use plot_predict() that you already imported into your code. Here is an example:
plot_predict(model_fit, dynamic=False)
plt.show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With