Package gmisclib :: Module mcmc :: Class rough_T_acceptor
[frames] | no frames]

Class rough_T_acceptor

source code


This class implements a normal Metropolis-Hastings acceptance of steps.

Instance Methods
 
__init__(self, probestep, tau_probe=None, T=1.0, jitterdroop=None)
You can change the temperature to do simulated annealing.
source code
float
T(self)
Returns: the system temperature.
source code
bool
__call__(self, delta)
Accept a step or not?
source code
float
jitter(self)
In the acoustic distances paper, it is called $\bar{delta}$. (Inherited from gmisclib.mcmc.rough_acceptor_base)
source code
 
probe(self, currentpos, stepper)
This computes logP() near the current step position, and sees how much that differs from logP() _at_ the current step position. (Inherited from gmisclib.mcmc.rough_acceptor_base)
source code
 
reset(self)
In order to make the overal algorithm asymptotically a Markovian, we need to make sure that (asymptotically) the acceptor function depends only on long-term averages, not on recent history. (Inherited from gmisclib.mcmc.rough_acceptor_base)
source code

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

Instance Variables
  last_probe
A pair of position_base instances showing the position and logP at each end of the most recent probe for a discontinuity. (Inherited from gmisclib.mcmc.acceptor_base)
  since_last_reset
Number of iterations since the last overall MCMC reset. (Inherited from gmisclib.mcmc.rough_acceptor_base)
Properties

Inherited from object: __class__

Method Details

__init__(self, probestep, tau_probe=None, T=1.0, jitterdroop=None)
(Constructor)

source code 

You can change the temperature to do simulated annealing.

Parameters:
  • T (float) - temperature
  • probestep (function(stepper) -> numpy.ndarray (length=BootStepper.np).) - something callable that generates small offsets within a voxel. This is called with the currently active stepper as an argument.
Overrides: object.__init__

T(self)

source code 
Returns: float
the system temperature.
Overrides: acceptor_base.T

__call__(self, delta)
(Call operator)

source code 

Accept a step or not?

Parameters:
  • delta (float) - The proposed step gives delta as the change in log(probability).
Returns: bool
should it be accepted or not?
Overrides: acceptor_base.__call__