Skip to content

Commit

Permalink
Restored test_bad; changed testvals of test case
Browse files Browse the repository at this point in the history
  • Loading branch information
fonnesbeck committed Jan 18, 2017
1 parent a742cce commit a2c663e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pymc3/tests/test_diagnostics.py
Expand Up @@ -20,7 +20,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': 2., 'late_mean': 3., 'switchpoint': 90}
start = {'early_mean': 7., 'late_mean': 1., 'switchpoint': 90}
ptrace = sample(n_samples, step=[step1, step2], start=start, njobs=2, progressbar=False,
random_seed=[1, 4])
return ptrace
Expand All @@ -32,12 +32,12 @@ def test_good(self):
self.assertTrue(all(1 / self.good_ratio < r <
self.good_ratio for r in rhat.values()))

# def test_bad(self):
# """Confirm Gelman-Rubin statistic is far from 1 for a small number of samples."""
# n_samples = 10
# rhat = gelman_rubin(self.get_ptrace(n_samples))
# self.assertFalse(all(1 / self.good_ratio < r <
# self.good_ratio for r in rhat.values()))
def test_bad(self):
"""Confirm Gelman-Rubin statistic is far from 1 for a small number of samples."""
n_samples = 10
rhat = gelman_rubin(self.get_ptrace(n_samples))
self.assertFalse(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"""
Expand Down

0 comments on commit a2c663e

Please sign in to comment.