Package csb :: Package statistics :: Package samplers :: Package mc :: Module singlechain :: Class RWMCSampler
[frames] | no frames]

Class RWMCSampler

source code

     object --+            
              |            
AbstractSampler --+        
                  |        
         AbstractMC --+    
                      |    
  AbstractSingleChainMC --+
                          |
                         RWMCSampler

Random Walk Metropolis Monte Carlo implementation (Metropolis, Rosenbluth, Teller, Teller 1953; Hastings, 1970).

Nested Classes

Inherited from AbstractSampler: __metaclass__

Instance Methods
 
__init__(self, pdf, state, stepsize=1.0, proposal_density=None, temperature=1.0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from AbstractSingleChainMC: sample

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

Class Variables
  __abstractmethods__ = frozenset([])
Properties
  stepsize

Inherited from AbstractSingleChainMC: acceptance_rate, energy, last_move_accepted, temperature

Inherited from AbstractMC: state

Inherited from object: __class__

Method Details

__init__(self, pdf, state, stepsize=1.0, proposal_density=None, temperature=1.0)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • pdf (csb.statistics.pdf.AbstractDensity) - Probability density function to be sampled from
  • state (State) - Inital state
  • stepsize (float) - Serves to set the step size in proposal_density, e.g. for automatic acceptance rate adaption
  • proposal_density (callable) - The proposal density as a function f(x, s) of the current state x and the stepsize s. By default, the proposal density is uniform, centered around x, and has width s.
  • temperature (float) - Pseudo-temperature of the Boltzmann ensemble p(x) = 1/N * exp(-1/T * E(x)) with the pseudo-energy defined as E(x) = -log(p(x)) where p(x) is the PDF under consideration
Overrides: object.__init__
(inherited documentation)

Property Details

stepsize

Get Method:
unreachable.stepsize(self)
Set Method:
unreachable.stepsize(self, value)