Skip to content

Commit

Permalink
fix partial gaussian newton update
Browse files Browse the repository at this point in the history
  • Loading branch information
William Wilkinson committed Feb 17, 2023
1 parent 4812266 commit ffe3ed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bayesnewton/likelihoods.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def gauss_newton(self, y, f):
log_target = -0.5 * V.T @ V + self.log_normaliser(f)
jacobian = -J.T @ V + ZJ
# hessian_approx = -J.T @ J + self.log_normaliser_hessian(f)
hessian_approx = -J.T @ J - ZJ.T @ ZJ
hessian_approx = -J.T @ J - np.diag((ZJ**2).flattent())
# second_order_term = -H.T * V
return log_target, jacobian, hessian_approx # , second_order_term

Expand Down

0 comments on commit ffe3ed7

Please sign in to comment.