class ChordEngine( Engine ) | Source |
---|
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 described in "POLYCHORD: next-generation nested sampling", WJ Handley, MP Hobson and AN Lasenby. MNRAS (2015) Volume 453, Issue 4, p 4384–4398
Attributes
- debug : bool
perform the step-out action too
Attributes from Engine
walkers, errdis, slow, maxtrials, nstep, rng, verbose, report, unitRange, unitMin
Author Do Kester.
ChordEngine( walkers, errdis, copy=None, **kwargs ) |
---|
Constructor.
Parameters
- walkers : WalkerList
walkers to be diffused - errdis : ErrorDistribution
error distribution to be used - copy : ChordEngine
to be copied - kwargs : for Engine
"slow", "seed", "verbose"
copy( ) |
---|
execute( kw, lowLhood, append=False, iteration=0 ) |
---|
Parameters
- kw : int
index of walker to diffuse - lowLhood : float
lower limit in logLikelihood - append : bool
set walker in place or append - iteration : int
iteration number
Returns
- int : the number of successfull moves
stepOut( problem, ptry, usav, vel, t, tmax, lowLhood, fitIndex ) |
---|
Methods inherited from Engine |
---|
- bestBoost( problem, myFitter=None )
- setWalker( kw, problem, allpars, logL, walker=None, fitIndex=None )
- noBoost( walker )
- doBoost( walker )
- domain2Unit( problem, dval, kpar=None )
- unit2Domain( problem, uval, kpar=None )
- startJourney( unitStart )
- calcJourney( unitDistance )
- reportJourney( )
- makeIndex( np, val )
- reportCall( )
- reportSuccess( )
- reportReject( )
- reportFailed( )
- reportBest( )
- printReport( best=False )
- successRate( )
- getUnitMinmax( problem, lowLhood )
- getUnitRange( problem, lowLhood )