removed irrelevant mh test from this pr
@@ -105,30 +105,6 @@ class SearchTest(HMMSamplingTestCase):
self.assertTrue(i + 1 in tr_rets)
-class MHTest(NormalNormalSamplingTestCase):
-
- def test_mh_guide(self):
- posterior = pyro.infer.MH(self.model, guide=self.guide,
- samples=2000, lag=1, burn=0)
- posterior_samples = [posterior()[0][0]["mu"]["value"] for i in range(100)]
- posterior_mean = torch.mean(torch.cat(posterior_samples))
- posterior_stddev = torch.sqrt(torch.mean(torch.cat(posterior_samples) ** 2))
- self.assertEqual(0, torch.norm(posterior_mean - self.mu_mean).data[0],
- prec=0.01)
- self.assertEqual(0, torch.norm(posterior_stddev - self.mu_stddev).data[0],
- prec=0.1)
-
- def test_mh_single_site(self):
- posterior = pyro.infer.mh.SingleSiteMH(self.model,
- samples=2000, lag=1, burn=0)
- posterior_samples = [posterior()[0][0]["mu"]["value"] for i in range(100)]
- posterior_mean = torch.mean(torch.cat(posterior_samples))
- posterior_stddev = torch.sqrt(torch.mean(torch.cat(posterior_samples) ** 2))
- self.assertEqual(0, torch.norm(posterior_mean - self.mu_mean).data[0],
- prec=0.01)
- self.assertEqual(0, torch.norm(posterior_stddev - self.mu_stddev).data[0],
- prec=0.1)
-
class ImportanceTest(NormalNormalSamplingTestCase):
