FutureWarning: statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have been deprecated

We Are Going To Discuss About FutureWarning: statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have been deprecated. So lets Start this Python Article.

FutureWarning: statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have been deprecated

  1. How to solve FutureWarning: statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have been deprecated

    This warning is occuring due to deprication of the ARIMA package “statsmodels\tsa\arima_model”.
    Instead, import the statsmodel with:
    import statsmodels.api as sm
    And fit ARIMA model as:
    model = sm.tsa.arima.ARIMA(train_data, order=(1,1,2)) result = model.fit()

  2. FutureWarning: statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have been deprecated

    This warning is occuring due to deprication of the ARIMA package “statsmodels\tsa\arima_model”.
    Instead, import the statsmodel with:
    import statsmodels.api as sm
    And fit ARIMA model as:
    model = sm.tsa.arima.ARIMA(train_data, order=(1,1,2)) result = model.fit()

Solution 1

This warning is occuring due to deprication of the ARIMA package “statsmodels\tsa\arima_model”.

Instead, import the statsmodel with:

import statsmodels.api as sm

And fit ARIMA model as:

model = sm.tsa.arima.ARIMA(train_data, order=(1,1,2))
result = model.fit()

Original Author VIKRAM NAYYAR Of This Content

Solution 2

As of today, the statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have
been removed in favor of statsmodels.tsa.arima.model.ARIMA (without _) and statsmodels.tsa.SARIMAX.

This is because statsmodels.tsa.arima.model.ARIMA makes use of the statespace framework and they’re both well tested and maintained.
It also offers alternative specialized parameter estimators.

If you try to use ARMA from statsmodels.tsa.arima_model you’ll get NotImplementedError message error.

A quick fix to use ARIMA model could be like this:

from statsmodels.tsa.arima.model import ARIMA
model = ARIMA(dataFrame.columnName, order=(1,0,0))

You can find more details in this issue.

Original Author Ibrahim.H Of This Content

Solution 3

Run the code below to ignore ARIMA warnings

import warnings

warnings.filterwarnings("ignore")

Original Author edited May 27, 2021 at 5:42 Of This Content

Solution 4

Instead of using

from statsmodels.tsa.arima_model import ARIMA

Please change to following

from statsmodels.tsa.arima.model import ARIMA

Original Author Md. Mahmudur Rahman Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment