moved n

parent 2aaa982f
......@@ -98,6 +98,9 @@ class EnsembleLikelihood(Likelihood):
result_1 = np.vdot(c, first_summand_val)
result_2 = -np.vdot(c, second_summand_val)
result_1 /= n
result_2 /= n
# compute regularizing determinant of the covariance
# det(A + UV^T) = det(A) det(I + V^T A^-1 U)
log_det_1 = np.sum(np.log(B))
......@@ -105,7 +108,7 @@ class EnsembleLikelihood(Likelihood):
if sign < 0:
self.logger.error("Negative determinant of covariance!")
result = -0.5*((result_1 + result_2)/n + log_det_1 + log_det_2)
result = -0.5*(result_1 + result_2 + log_det_1 + log_det_2)
self.logger.info("Calculated (%s): -(%g + %g + %g + %g) = %g" %
(self.observable_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment