Skip to content

Commit ffe3ed7

Browse files
author
William Wilkinson
committed
fix partial gaussian newton update
1 parent 4812266 commit ffe3ed7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayesnewton/likelihoods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def gauss_newton(self, y, f):
171171
log_target = -0.5 * V.T @ V + self.log_normaliser(f)
172172
jacobian = -J.T @ V + ZJ
173173
# hessian_approx = -J.T @ J + self.log_normaliser_hessian(f)
174-
hessian_approx = -J.T @ J - ZJ.T @ ZJ
174+
hessian_approx = -J.T @ J - np.diag((ZJ**2).flattent())
175175
# second_order_term = -H.T * V
176176
return log_target, jacobian, hessian_approx # , second_order_term
177177

0 commit comments

Comments
 (0)