0

I ru both codes below python and get similar errors

model_fit.plot_predict(dynamic=False)
plt.show()

Error:AttributeError: 'function' object has no attribute 'plot_predict'

plot_predict(model_fit, dynamic=False)
plt.show()

Error: AttributeError: 'function' object has no attribute 'get_prediction'

Name: statsmodels
Version: 0.14.0

Any ideas?

google! nothign works

6
  • Please post your full code. Commented Jan 30, 2024 at 14:12
  • I've fit my ARIMA Model model = ARIMA(train, order=(0,1,2)) model_fit = model.fit results = model.fit() print(results.summary()) Commented Jan 30, 2024 at 14:22
  • Dep. Variable: Quantity No. Observations: 33 Model: ARIMA(0, 1, 2) Log Likelihood -369.461 Date: Tue, 30 Jan 2024 AIC 744.923 Time: 11:55:57 BIC 749.320 Sample: 01-31-2015 HQIC 746.380 - 09-30-2017 Covariance Type: opg Commented Jan 30, 2024 at 14:27
  • coef std err z P>|z| [0.025 0.975] ma.L1 -0.3438 0.102 -3.360 0.001 -0.544 -0.143 ma.L2 0.3288 0.119 2.764 0.006 0.096 0.562 sigma2 5.604e+08 1.45e-11 3.85e+19 0.000 5.6e+08 5.6e+08 Commented Jan 30, 2024 at 14:27
  • 1
    edit your question with the code instead of putting it into comments, so it's easier to read. AFAIC model_fit = model.fit is missing the call (), use model_fit = model.fit() Commented Jan 30, 2024 at 17:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.