Skip to content

Commit

Permalink
fix determinant calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Dec 17, 2023
1 parent db1fa38 commit fd2a747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dr/math/distributions/GaussianMarkovRandomField.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private double getLogDeterminant() {

if (!isImproper()) {
double lambda = lambdaParameter.getParameterValue(0);
logDet += (1 - dim) * Math.log(1 - lambda * lambda);
logDet += Math.log(1 - lambda * lambda);
}

if (CHECK_DETERMINANT) {
Expand All @@ -260,7 +260,7 @@ private double getLogDeterminant() {
}

if (Math.abs(sum - logDet) > 1E-6) {
throw new RuntimeException("Incorrect pseudo-determinant");
throw new RuntimeException("Incorrect (pseudo-) determinant");
}
}

Expand Down

0 comments on commit fd2a747

Please sign in to comment.