ChordEngine = class ChordEngine(Engine)
||ChordEngine(walkers, errdis, copy=None, **kwargs)|
Move a a walker in a random direction.
The ChordEngine draws a random line through the walker parameters in
unit space, from unitMin (lowpoint) with lengths unitRange (highpoint).
A random point on the line is selected. If the corresponding parameter
set has a likelihood < LowLhood, it is accepted. Otherwise either the
highpoint is reset to the random point (if randompoint > walkerpoint)
or the lowpoint is replaced by the randompoint (if walker < random).
Then a new random point on the line is selected, until the point is accepted.
When the point is accepted, another random line is constructed
through the new point and orthogonal to (all) previous ones.
(The orthogonality is not implemented now. TBC).
This is an independent implementation inspired by the polychord engine
"POLYCHORD: next-generation nested sampling",
WJ Handley, MP Hobson and AN Lasenby.
MNRAS (2015) Volume 453, Issue 4, p 4384–4398
nstep : int
average number of orthogonal steps
debug : bool
perform the step-out action too
Attributes from Engine
walkers, errdis, slow, maxtrials, rng,
verbose, report, unitRange, unitMin
Author Do Kester.
- Method resolution order:
Methods defined here:
- ChordEngine( walkers, errdis, copy=None, **kwargs )
walkers : WalkerList
walkers to be diffused
errdis : ErrorDistribution
error distribution to be used
copy : ChordEngine
to be copied
kwargs : for Engine
"slow", "seed", "verbose"
- Return copy of this.
- execute( kw, lowLhood, append=False, iteration=0)
- Execute the engine by diffusing the parameters.
kw : int
index of walker to diffuse
lowLhood : float
lower limit in logLikelihood
append : bool
set walker in place or append
iteration : int
int : the number of successfull moves
- stepOut( problem, ptry, usav, vel, t,
tmax, lowLhood, fitIndex)
- Check if endpoints are indeed outside the lowLhood domain.
Methods inherited from Engine:
- checkBest( problem, allpars, logL, fitIndex=None )
- domain2Unit( problem, dval, kpar=None )
- makeIndex( np, val )
- setWalker( kw, problem, allpars, logL, fitIndex=None )
- unit2Domain( problem, uval, kpar=None )