Skip to content

Latest commit

 

History

History
121 lines (96 loc) · 6.25 KB

File metadata and controls

121 lines (96 loc) · 6.25 KB




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

  • reset : bool (False)
         always reset othonormal basis
  • extend : bool (False)
         perform the step-out action until logL < lowL
  • plotter :

Attributes from Engine
walkers, errdis, slow, maxtrials, nstep, rng, verbose, report, unitRange, unitMin

Author Do Kester.

ChordEngine( walkers, errdis, copy=None, **kwargs ) [source]

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( ) [source]

execute( kw, lowLhood, iteration=0 ) [source]
Execute the engine by diffusing the parameters.

Parameters

  • kw : int
         index of walker to diffuse
  • lowLhood : float
         lower limit in logLikelihood
  • iteration : int
         iteration number

Returns

  • int : the number of successfull moves

stepOut( problem, ptry, usav, vel, t, tmax, lowLhood, fitIndex ) [source]
Check if endpoints are indeed outside the lowLhood domain.

plotOut( problem, usave, vel, t0, t1 ) [source]

plotOutDummy( problem, usave, vel, t0, t1 ) [source]
Methods inherited from Engine