Skip to content

Commit

Permalink
renaming the fixture function for iteration. burn and thinning
Browse files Browse the repository at this point in the history
Signed-off-by: t.hajimohammadloo <[email protected]>
Signed-off-by: david.randell <[email protected]>
  • Loading branch information
davidrandell84 committed Jun 19, 2024
1 parent 37d2b88 commit 6d69147
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/test_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ def fix_state(request):

@pytest.fixture(
params=[(0, 4000, 1), (2000, 4000, 5), (0, 6000, 10), (2000, 6000, 1)],
ids=[
"n_burn=0,n_iter=4000, n_thin=1",
"n_burn=non-zero,n_iter=4000,n_thin=5",
"n_burn=0,n_iter=6000, n_thin=10",
"n_burn=non-zero,n_iter=6000,n_thin=1",
],
ids=["n_burn=0,n_iter=4000, n_thin=1",
"n_burn=non-zero,n_iter=4000,n_thin=5",
"n_burn=0,n_iter=6000, n_thin=10",
"n_burn=non-zero,n_iter=6000,n_thin=1"],
name="mcmc_settings",
)
def fix_mcmc_settings(request):
Expand Down Expand Up @@ -121,10 +119,16 @@ def mock_log_p(self, current_state):
)
=======
M = MCMC(state, sampler, model,
<<<<<<< HEAD
n_burn=nburn_niter["nburn"],
n_iter=nburn_niter["niter"],
n_thin=nburn_niter["nthin"])
>>>>>>> b4ba606 (updated unit test to include thinning)
=======
n_burn=mcmc_settings["nburn"],
n_iter=mcmc_settings["niter"],
n_thin=mcmc_settings["nthin"])
>>>>>>> 682a0d0 (renaming the fixture function for iteration. burn and thinning)
M.store["count"] = 0
M.run_mcmc()
assert M.state["count"] == (M.n_iter + M.n_burn) * len(sampler) * M.n_thin
Expand Down

0 comments on commit 6d69147

Please sign in to comment.