Skip to content

Latest commit

 

History

History
94 lines (70 loc) · 4.54 KB

File metadata and controls

94 lines (70 loc) · 4.54 KB




class NearEngine( OrderEngine )[source]

The NearEngine searches the nearest neighbour (NN) for a point and goes there first.

This is NOT a random engine as it mostly(??) steps uphill.

It belongs to the class of generalized travelling salesman problems where the parameters of the problem is an ordered list.

The walker is kept when the logLikelihood > lowLhood

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

Author Do Kester.

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

Constructor.

Parameters

  • walkers : SampleList
         walkers to be diffused
  • errdis : ErrorDistribution
         error distribution to be used
  • copy : NearEngine
         to be copied
  • kwargs : dict for Engine
         "phantoms", "slow", "seed", "verbose"

copy( ) [source]

executeOnce( kw, lowLhood, dims=[0,1] ) [source]
Execute the NearEngine one time.

TBC: This engine seems to take a lot of CPU.

Parameters

  • kw : int
         id of walker to diffuse
  • lowLhood : float
         lower limit in logLikelihood
  • dims : list of 2 ints
         dimensions to process over
Methods inherited from OrderEngine
Methods inherited from Engine