Skip to content

Commit

Permalink
Correct GMRF Weights
Browse files Browse the repository at this point in the history
  • Loading branch information
PratyusaDatta committed Apr 2, 2024
1 parent fab5f00 commit 42b92d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ci/TestXML/testGaussianMarkovRandomField.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" standalone="yes"?>
<beast>

<parameter id="data" value="90 78 34 12"/>
<parameter id="data" value="1 2 3 6"/>

<taxa id="taxa">
<taxon id="A"/>
Expand Down Expand Up @@ -38,10 +38,10 @@
<distribution>
<GaussianMarkovRandomField dim="4" matchPseudoDeterminant="false">
<precision>
<parameter id="precision" value="0.1"/>
<parameter id="precision" value="3"/>
</precision>
<mean>
<parameter id="mean" value="0"/>
<parameter id="mean" value="3"/>
</mean>
<weightProvider>
<treeModel idref="treeModel"/>
Expand Down
2 changes: 1 addition & 1 deletion src/dr/inference/distribution/Weights.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public double weight(int index1, int index2) {
index1 = temp;
}

return (intervals.getInterval(index1) + intervals.getInterval(index2))/2;
return 2/(intervals.getInterval(index1) + intervals.getInterval(index2));
}

}
Expand Down

0 comments on commit 42b92d5

Please sign in to comment.