Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1326 from thempel/fix_submodel_tests
Browse files Browse the repository at this point in the history
[msm tests] hard-code submodel test dtraj
  • Loading branch information
marscher authored Jun 28, 2018
2 parents 9deb3ae + 577d4b0 commit a2750f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions pyemma/msm/tests/test_bayesian_hmsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@ def test_submodel_simple(self):
# sanity check for submodel;
# call should not alter self
from copy import deepcopy
dtrj = np.random.randint(0, 2, size=100)
dtrj[np.random.randint(0, dtrj.shape[0], 3)] = 2
# dtrj = np.random.randint(0, 2, size=100)
# dtrj[np.random.randint(0, dtrj.shape[0], 3)] = 2
# hard-coded due to stochastic failures
dtrj = [1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0,
0, 2, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0,
1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 1, 1,
0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0]

h = bayesian_hidden_markov_model(dtrj, 3, 2)
h_original = deepcopy(h)

Expand Down
10 changes: 8 additions & 2 deletions pyemma/msm/tests/test_hmsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,14 @@ def test_submodel_simple(self):
# sanity check for submodel;
# call should not alter self
from copy import deepcopy
dtrj = np.random.randint(0, 2, size=100)
dtrj[np.random.randint(0, dtrj.shape[0], 3)] = 2
# dtrj = np.random.randint(0, 2, size=100)
# dtrj[np.random.randint(0, dtrj.shape[0], 3)] = 2
# hard-coded due to stochastic failures
dtrj = [1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0,
0, 2, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0,
1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 1, 1,
0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0]

h = msm.estimate_hidden_markov_model(dtrj, 3, 2)
h_original = deepcopy(h)

Expand Down

0 comments on commit a2750f0

Please sign in to comment.