Skip to content

Commit

Permalink
Fix iteration range in non-stepwise AutoARIMA (Nixtla#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calzolari authored Aug 7, 2023
1 parent 4aae7bd commit 1a4f687
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions nbs/src/arima.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1881,10 +1881,10 @@
" #max_K = allow_drift or allow_mean\n",
" \n",
" best_ic = np.inf\n",
" for i in range(max_p):\n",
" for j in range(max_q):\n",
" for I in range(max_P):\n",
" for J in range(max_Q):\n",
" for i in range(max_p + 1):\n",
" for j in range(max_q + 1):\n",
" for I in range(max_P + 1):\n",
" for J in range(max_Q + 1):\n",
" if i + j + I + J > max_order:\n",
" continue\n",
" fit = myarima(\n",
Expand Down
8 changes: 4 additions & 4 deletions statsforecast/arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,10 +1315,10 @@ def search_arima(
# max_K = allow_drift or allow_mean

best_ic = np.inf
for i in range(max_p):
for j in range(max_q):
for I in range(max_P):
for J in range(max_Q):
for i in range(max_p + 1):
for j in range(max_q + 1):
for I in range(max_P + 1):
for J in range(max_Q + 1):
if i + j + I + J > max_order:
continue
fit = myarima(
Expand Down

0 comments on commit 1a4f687

Please sign in to comment.