Package BIP :: Package Bayes :: Package Samplers :: Module MCMC :: Class Metropolis
[hide private]
[frames] | no frames]

Class Metropolis

source code

object --+
         |
        Metropolis

Metropolis Hastings sampler class
Instance Methods [hide private]
 
__init__(self, proposal_dist, likfun)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
propose(self)
generates proposals
source code
 
step(self, n=1)
Does the actual sampling loop for n steps
source code
 
tune(self, ar)
Tune the proposal distribtion variance in the case of using a Normal proposal distribution
source code
 
add_salt(self, dataset, band)
Adds a few extra uniformly distributed data points beyond the dataset range.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, proposal_dist, likfun)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

add_salt(self, dataset, band)

source code 
Adds a few extra uniformly distributed data points beyond the dataset range. This is done by adding from a uniform dist.
Parameters:
  • dataset - vector of data
  • band - Fraction of range to extend: [0,1[
Returns:
Salted dataset.