Bashir Alam
Bashir Alam

Reputation: 11

Getting NotImplementedError while training ARIMA model

I am trying to use the ARIMA algorithm on a time series dataset. Everything is fine until I initialize the model.

Once I initialized the ARIMA model, I am getting the error:

    28 def __init__(self, *args, **kwargs):
    ---> 29     raise NotImplementedError(ARIMA_DEPRECATION_ERROR)

    NotImplementedError: 
    statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have
    been removed in favor of statsmodels.tsa.arima.model.ARIMA (note the .
    between arima and model) and statsmodels.tsa.SARIMAX.

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

Please help me to figure out.

Upvotes: 0

Views: 6341

Answers (2)

Joe Anson aquino
Joe Anson aquino

Reputation: 1

Copy, then paste this code to the Anaconda Environment, it will replace the "Multiple Error":

conda install -c conda-forge pmdarima

Link: https://anaconda.org/conda-forge/pmdarima

Upvotes: 0

Arne Decker
Arne Decker

Reputation: 923

You are initializing a deprecated ARIMA model. The class statsmodels.tsa.arima_model.ARIMA is no longer available in newer versions of statsmodels. Somewhere in your code you import the model with something like this:

from statsmodels.tsa.arima_model import ARIMA

Just replace it with the newer model:

from statsmodels.tsa.arima.model import ARIMA

Then it should work again. Perhaps you have to change some parameters though, check the documentation for that: https://www.statsmodels.org/devel/generated/statsmodels.tsa.arima.model.ARIMA.html

Upvotes: 3

Related Questions