Skip to content

Commit 8992601

Browse files
authored
Fix spurious test failure (#152)
1 parent eef8bb0 commit 8992601

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/markov/hmm/test_mlhmm.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -554,13 +554,13 @@ def test_sample_by_noncrisp_observation_probabilities_mapping(self):
554554
hmm = HiddenMarkovModel(tmat, obs)
555555
# dtraj halfway-split between states 0 and 1
556556
dtrajs = np.repeat([0, 1], 10)
557-
n_samples = 300000
557+
n_samples = 500000
558558
samples = hmm.sample_by_observation_probabilities(dtrajs, n_samples)
559559
# test that both hidden states map to correct distributions
560560
probs_hidden1 = np.histogram(dtrajs[samples[0][:, 1]], bins=2)[0] / n_samples
561561
probs_hidden2 = np.histogram(dtrajs[samples[1][:, 1]], bins=2)[0] / n_samples
562-
assert_array_almost_equal(probs_hidden1, [.9, .1], decimal=3)
563-
assert_array_almost_equal(probs_hidden2, [.4, .6], decimal=3)
562+
assert_array_almost_equal(probs_hidden1, [.9, .1], decimal=2)
563+
assert_array_almost_equal(probs_hidden2, [.4, .6], decimal=2)
564564

565565
def test_simulate_HMSM(self):
566566
hmsm = self.hmm_lag10_largest

0 commit comments

Comments
 (0)