Skip to content

Commit

Permalink
removing simple mh sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Oct 5, 2017
1 parent 478eb90 commit 083740e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 188 deletions.
18 changes: 8 additions & 10 deletions emcee/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (division, print_function, absolute_import,
unicode_literals)
from .sampler import *
from .mh import *
from .ensemble import *
from .ptsampler import *
from . import utils
from . import autocorr
from __future__ import print_function, absolute_import

__version__ = "3.0.0.dev0"

from .ensemble import EnsembleSampler

from . import moves
from . import autocorr

__version__ = "2.2.1"
__all__ = ["EnsembleSampler", "moves", "autocorr"]


def test():
Expand Down
164 changes: 0 additions & 164 deletions emcee/mh.py

This file was deleted.

14 changes: 0 additions & 14 deletions emcee/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import numpy as np

from .autocorr import integrated_time
from .mh import MHSampler
from .ensemble import EnsembleSampler
from .ptsampler import PTSampler

logprecision = -4

Expand Down Expand Up @@ -118,18 +116,6 @@ def check_pt_sampler(self, cutoff, N=None, p0=None):
# case is OK.
self.sampler.run_mcmc (p0, 10, lnlike0=-4)

def test_mh(self):
self.sampler = MHSampler(self.cov, self.ndim, lnprob_gaussian,
args=[self.icov])
self.check_sampler(N=self.N * self.nwalkers, p0=self.p0[0])

def test_mh_unif(self):
f = lambda x: 0.0 if np.all((0.0 <= x) & (x <= 1.0)) else -np.inf
self.sampler = MHSampler(self.cov, self.ndim, f)
self.sampler.run_mcmc(np.random.rand(self.ndim), 100)
chain = self.sampler.chain
assert np.any(np.abs(np.diff(chain, axis=0)) > 0.0)

def test_ensemble(self):
self.sampler = EnsembleSampler(self.nwalkers, self.ndim,
lnprob_gaussian, args=[self.icov])
Expand Down

0 comments on commit 083740e

Please sign in to comment.