Skip to content

Commit

Permalink
Better fix for failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
fonnesbeck committed Apr 19, 2017
1 parent b9436f0 commit 863079e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pymc3/tests/test_diagnostics.py
Expand Up @@ -21,7 +21,7 @@ def get_ptrace(self, n_samples):
# Run sampler
step1 = Slice([model.early_mean_log_, model.late_mean_log_])
step2 = Metropolis([model.switchpoint])
start = {'early_mean': 3., 'late_mean': 1., 'switchpoint': 100}
start = {'early_mean': 7., 'late_mean': 1., 'switchpoint': 100}
ptrace = sample(n_samples, step=[step1, step2], start=start, njobs=2,
progressbar=False, random_seed=[20090425, 19700903])
return ptrace
Expand All @@ -35,15 +35,15 @@ def test_good(self):

def test_bad(self):
"""Confirm Gelman-Rubin statistic is far from 1 for a small number of samples."""
n_samples = 10
n_samples = 5
rhat = gelman_rubin(self.get_ptrace(n_samples))
assert not all(1 / self.good_ratio < r <
self.good_ratio for r in rhat.values())

def test_right_shape_python_float(self, shape=None, test_shape=None):
"""Check Gelman-Rubin statistic shape is correct w/ python float"""
n_jobs = 3
n_samples = 10
n_samples = 5

with Model():
if shape is not None:
Expand Down

0 comments on commit 863079e

Please sign in to comment.