Navigation
class RandomEngine( Engine ) | Source |
---|
RandomEngine.
It generates a random trial point from the available unit box. If it is OK (> lowLhood) it is kept. The execute method returns immediately as the new point is random and completely independent of the fiducial point.
If is is not OK, the trial point is shrunk by a random amount toward the fiducial point, until it is accepted. Now the new point is not independent of the fiducial point. We start the execution again starting from the new point.
The restart is repeated a few times after which he new point is deemed sufficiently independent.
Attributes from Engine
walkers, errdis, maxtrials, slow, rng, report, phantoms, verbose
Author Do Kester.
RandomEngine( walkers, errdis, copy=None, **kwargs ) |
---|
Constructor. Parameters
- walkers : WalkerList
walkers to be diffused - errdis : ErrorDistribution
error distribution to be used - copy : RandomEngine
engine to be copied - kwargs : for Engine
"phantoms", "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
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 )