Skip to content

Commit

Permalink
fix in gradient test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusMNoack committed Feb 27, 2023
1 parent a4ca14a commit 3f434ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fvgp/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def test_log_likelihood_gradient(self,hyperparameters):
thps_aux = np.array(thps)
thps_aux[i] = thps_aux[i] + eps
grad[i] = (self.log_likelihood(thps_aux) - self.log_likelihood(thps))/eps
analytical = self.log_likelihood_gradient(thps)
analytical = -self.neg_log_likelihood_gradient(thps)
if np.linalg.norm(grad-analytical) > np.linalg.norm(grad)/100.0:
print("Gradient possibly wrong")
print(grad)
Expand Down

0 comments on commit 3f434ac

Please sign in to comment.