警告
FutureWarning: statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have been deprecated
或者报错
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.
这是因为statsmodels.tsa.arima.model.ARIMA使用了statespace框架,并且它们都经过了很好的测试和维护。它还提供了替代的专用参数估计器。
如果您尝试使用ARMAfromstatsmodels.tsa.arima_model您将收到NotImplementedError消息错误。
使用ARIMA模型的快速修复可能是这样的:
from statsmodels.tsa.arima.model import ARIMA
model = ARIMA(dataFrame.columnName, order=(1,0,0))
即将
from statsmodels.tsa.arima_model import ARIMA
请改为以下
from statsmodels.tsa.arima.model import ARIMA