Commit 193f66f
committed
Widen MCMC convergence tolerances to 3 SE; fix seed for reproducibility
UpDownOperatorTest.testLogNormalDistribution and
RealRandomWalkOperatorTest.testNormalDistribution were failing
intermittently because their tolerance (5e-3) was at ~2.7 SE of the
sample mean — a ~5%/~10% expected failure rate per run by design.
Computing 3 SE properly using ESS rather than nominal sample count:
UpDownOperatorTest (LogNormal M=1, S=1, no tree, ~498k samples,
ESS near nominal): SE = sqrt(1.72 / 498000) ~= 1.86e-3, 3 SE ~= 5.6e-3.
Tolerance set to 6e-3.
RealRandomWalkOperatorTest (Normal mean=1, var=1, documented Mirror
ESS = 196k from existing comment): SE = sqrt(1 / 196000) ~= 2.26e-3,
3 SE ~= 6.8e-3. Tolerance set to 7e-3.
Re-enabled Randomizer.setSeed(127) in RealRandomWalkOperatorTest
(it had been commented out, leaving the test non-deterministic
against whatever Randomizer state preceded it).
Expected failure rate at the new bounds: 0.27% per test run.
These are pre-existing flake fixes surfaced when running mvn -Pslow-tests
test against the Scalable contract change (#70). The
identical failing values reproduce on master; not caused by the contract
change.1 parent 338b652 commit 193f66f
2 files changed
Lines changed: 10 additions & 5 deletions
File tree
- beast-base/src/test/java/beast/base/spec/evolution/operator
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
0 commit comments