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

Class adjuster

source code


The adjuster class controls the step size.

Instance Methods
 
__init__(self, F, vscale, vse=0.0, vsmax=1e+30)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
reset(self)
Called when old habits should be forgotten.
source code
 
f(self)
This allows the desired fraction of accepted steps to depend on self.vscale.
source code
 
inctry(self, accepted) source code
float
vs(self)
We stick in the factor of random.lognormvariate() so that all sizes of move are possible and thus we can prove that we can random-walk to any point in a connected region.
source code
 
status(self)
Returns: misc.
source code

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

Class Variables
  Z0 = 1.5
  DZ = 0.3
  TOL = 0.2
  STABEXP = 1.0
Instance Variables
  vsmax
Used when the acceptance probability is larger than 25%.
Properties

Inherited from object: __class__

Method Details

__init__(self, F, vscale, vse=0.0, vsmax=1e+30)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

f(self)

source code 

This allows the desired fraction of accepted steps to depend on self.vscale.

Requires: This method should only be called with self.vse != 0 where self.vscale can normally be expected to be fairly close to unity, and where small values of self.vse indicate trouble. In the mcmc.Bootstepper.step_boot case this is true.

vs(self)

source code 

We stick in the factor of random.lognormvariate() so that all sizes of move are possible and thus we can prove that we can random-walk to any point in a connected region. This makes the proof of ergodicity simpler.

Returns: float
a scale factor for the step size.

status(self)

source code 
Returns:
misc. status information for debugging purposes.

Instance Variable Details

vsmax

Used when the acceptance probability is larger than 25%. Large acceptance probabilities can happen if the probability is everywhere about equal. (E.g. a data fitting problem with almost no data)