Skip to content

Commit

Permalink
fix matrix product for arima var_coef (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez authored Jul 17, 2024
1 parent 45ef179 commit 32f459e
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 @@ -1339,7 +1339,7 @@
" A = arima_gradtrans(coef, arma)\n",
" A = A[np.ix_(mask, mask)]\n",
" sol = np.matmul(res.hess_inv, A) / n_used\n",
" var = np.dot(A, sol)\n",
" var = A.T @ sol\n",
" coef = arima_undopars(coef, arma)\n",
" else:\n",
" var = None if no_optim else res.hess_inv / n_used\n",
Expand Down
2 changes: 1 addition & 1 deletion statsforecast/arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ def arma_css_op(p, x):
A = arima_gradtrans(coef, arma)
A = A[np.ix_(mask, mask)]
sol = np.matmul(res.hess_inv, A) / n_used
var = np.dot(A, sol)
var = A.T @ sol
coef = arima_undopars(coef, arma)
else:
var = None if no_optim else res.hess_inv / n_used
Expand Down

0 comments on commit 32f459e

Please sign in to comment.