Skip to content

Commit ddd02e6

Browse files
Rescale the mu parameter in LS HMM to make larger.
1 parent a3d3ba8 commit ddd02e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sc2ts/inference.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,12 @@ def solve_num_mismatches(ts, k):
801801
r = 1e-3
802802
mu = 1e-20
803803
else:
804-
mu = 1e-6
804+
# NOTE: the magnitude of mu matters because it puts a limit
805+
# on how low we can push the HMM precision. We should be able to solve
806+
# for the optimal value of this parameter such that the magnitude of the
807+
# values within the HMM are as large as possible (so that we can truncate
808+
# usefully). This value is probably close for k=3 (it fails for k=2).
809+
mu = 1e-2
805810
denom = (1 - mu) ** k + (n - 1) * mu**k
806811
r = n * mu**k / denom
807812
assert mu < 0.5

0 commit comments

Comments
 (0)