Open Simply-Adi opened 3 years ago
What a coincidence. I was just about to post a bug report about this exact issue. I'm also seeing this division by zero error when using AICc as the IC. Attached are the data in question. The first column "y" is the dependent variable, and the second column "x" is an exogenous predictor.
The number of observations in the data is 10, which is less than the seasonal frequency (12) of the data. The code that raises the division by zero error is below.
mod_new = pmd.auto_arima(y, X=x, m=12,
seasonal=True, test='kpss', seasonal_test='ch',
stepwise=True, with_intercept='auto',
information_criterion='aicc',
error_action='ignore')
Even though the number of observations is less than the seasonal frequency, and seasonal=True
, I would expect auto_arima()
to fall back to a simple model like ARIMA(0,0,0)(0,0,0,0) and, if necessary, revert to AIC in the event of division by zero (due to num_obs - num_parms - 1 = 0
).
At least for this data set, I think the division by zero error is the result of the data and not the other arguments passed to auto_arima()
. For example, if the last observation in the data is ignored and passed to auto_arima()
using the same arguments as above, no division by zero error is raised. Code below raises no error.
mod_new = pmd.auto_arima(y[:-1], X=x[:-1], m=12,
seasonal=True, test='kpss', seasonal_test='ch',
stepwise=True, with_intercept='auto',
information_criterion='aicc',
error_action='ignore')
Versions of software:
statsmodels.api == 0.12.2
python == 3.9.7
pmdarima == 1.8.3
numpy == 1.21.2
Could you please provide a sample of data that reproduces this issue?
Could you please provide a sample of data that reproduces this issue?
I'm not sure if you were responding to OP or me, but I attached "data.csv" in my post.
Describe the question you have
I am implementing a backward feature elimination (BFE) involving autorima to find optimal parameters for a given set of regressors. While running the BFE, the following errors arises:
My initialization of autoriama is :
I tried diagnosing the problem. This error pops up when I am trying to run autoarima ( with AICc as criterion) with a specific subset of regressors. For the same subset, the error disappears when I use AIC as criterion.
Please help.
Versions (if necessary)