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

Class position_nonrepeatable

source code


This is for the (unfortunately common) case where logp is an indpendent random function of its arguments. It does not cache as much as position_repeatable. Arguments are analogous to position_repeatable.


Note: I think this class is obsolete, given the call to T_acceptor.probe() that is not inserted in to BootStepper.step().

Instance Methods
 
__init__(self, x, problem_def, logp=None)
You need this function and this signature if you are going to pass it to make_list_of_positions(), but not necessarily otherwise.
source code
 
logp(self)
Compute the log of the probability for the position.
source code
 
logp_nocompute(self)
Shows a recent logp value.
source code
position_base or a subclass
new(self, shift, logp=None)
Returns a new position, shifted by the specified amount.
source code
 
__repr__(self)
repr(x)
source code
 
__cmp__(self, other)
This is used when the archive is sorted. (Inherited from gmisclib.mcmc.position_base)
source code
 
prms(self)
The result of this function is to be handed to problem_definition.logp(). (Inherited from gmisclib.mcmc.position_base)
source code
 
uid(self) (Inherited from gmisclib.mcmc.position_base) source code
 
vec(self)
Returns a numpy vector. (Inherited from gmisclib.mcmc.position_base)
source code

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

Class Variables
  HUGE = 1e+38
Properties

Inherited from object: __class__

Method Details

__init__(self, x, problem_def, logp=None)
(Constructor)

source code 

You need this function and this signature if you are going to pass it to make_list_of_positions(), but not necessarily otherwise.

Decorators:
  • @g_implements.make_optional
Overrides: object.__init__
(inherited documentation)

logp(self)

source code 

Compute the log of the probability for the position.

Overrides: position_base.logp
(inherited documentation)

logp_nocompute(self)

source code 

Shows a recent logp value. It should not compute a value unless necessary. The intent is to look up a value in a cache.

Overrides: position_base.logp_nocompute
(inherited documentation)

new(self, shift, logp=None)

source code 

Returns a new position, shifted by the specified amount.

Parameters:
  • shift - How much of a move to make to the new position?
  • logp - (optional) If this is supplied, is is used to set the log(P) value for the newly created position structure.
Returns: position_base or a subclass
a new position
Overrides: position_base.new

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)