Skip to content

Commit

Permalink
fix: auto arima xreg rank deficient test (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewscottm authored Nov 4, 2024
1 parent 302cd42 commit cf2754c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbs/src/arima.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2385,7 +2385,7 @@
" else:\n",
" if constant_columns.any():\n",
" xregg = xregg[:, ~constant_columns]\n",
" X = np.hstack([np.arange(1, xregg.shape[0]+1).reshape(-1, 1), xregg])\n",
" X = np.hstack([np.ones([xregg.shape[0], 1]), xregg])\n",
" X = X[~np.isnan(X).any(1)]\n",
" _, sv, _ = np.linalg.svd(X)\n",
" if sv.min() / sv.sum() < np.finfo(np.float64).eps:\n",
Expand Down
2 changes: 1 addition & 1 deletion python/statsforecast/arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ def auto_arima_f(
else:
if constant_columns.any():
xregg = xregg[:, ~constant_columns]
X = np.hstack([np.arange(1, xregg.shape[0] + 1).reshape(-1, 1), xregg])
X = np.hstack([np.ones([xregg.shape[0], 1]), xregg])
X = X[~np.isnan(X).any(1)]
_, sv, _ = np.linalg.svd(X)
if sv.min() / sv.sum() < np.finfo(np.float64).eps:
Expand Down

0 comments on commit cf2754c

Please sign in to comment.