BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



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 )

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( )

Return copy of this.

executeOnce( kw, lowLhood, dims=[0,1] )
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