Skip to content

Commit

Permalink
bug fix in gauss-newton hessian
Browse files Browse the repository at this point in the history
  • Loading branch information
William Wilkinson committed Mar 6, 2023
1 parent 61cb0eb commit 0907b6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,5 @@ bayesnewton.egg-info/*
.idea/

src/data/audio_training_textures_Heavy_rain_on_hard_surface.wav

build/
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 - np.diag((ZJ**2).flattent())
hessian_approx = -J.T @ J - np.diag((ZJ**2).flatten())
# second_order_term = -H.T * V
return log_target, jacobian, hessian_approx # , second_order_term

Expand Down

0 comments on commit 0907b6f

Please sign in to comment.