Navigation
| class GalileanEngine( Engine ) | [source] |
|---|
Move all parameters in forward steps, with optional mirroring on the edge.
Move the parameters in a random direction for N iterations; mirror the direction on the gradient of the logLikelihood when the parameters enter the zone of logLlow.
Attributes
- size : float (0.5)
adaptable fraction for the (unit) direction of the stepping - wiggle : float (0.2)
factor to perturb the direction at each step.
between 0 (no perturbation) and 1 (new direction)
Attributes from Engine
walkers, errdis, maxtrials, nstep, slow, rng, report, phancol, verbose
Author Do Kester.
| GalileanEngine( walkers, errdis, copy=None, **kwargs ) | [source] |
|---|
Default Constructor.
Parameters
- walkers : WalkerList
walkers to be diffused - errdis : ErrorDistribution
error distribution to be used - copy : GalileanEngine
to be copied - kwargs : for Engine
"phancol", "slow", "seed", "verbose"
| copy( ) | [source] |
|---|
| execute( kw, lowLhood, iteration=0 ) | [source] |
|---|
Parameters
- kw : int
index in walkerlist, of the walker - lowLhood : float
lower limit in logLikelihood
Returns
- int : the number of successfull moves
| incsize( ) | [source] |
|---|
| decsize( ) | [source] |
|---|
| findEdge( problem, ptry, fitIndex, Lhood, Ltry, lowLhood, um, size, plot=False ) | [source] |
|---|
Parameters
- problem : Problem
the problem - ptry : array-like
parameters with likelihood outside lowLhood region - fitIndex : array-like
indices of parameters that need fitting - Lhood : float
last likelihood before going outside - Ltry : float
likelihood outside (at ptry) - lowLhood : float
lower limit in logLikelihood - um : UnitMovements (see below)
of this run - size : float
present size value
Returns
- pedge : array-like
parameter values at the edge of lowLhood - restep : float
part of the step outside lowLhood area.
| quadInterpol( x, y, lowL, plot=False ) | [source] |
|---|
Parameters
- x : array of 3 floats
x-values - y : array of 3 floats
y-values - ylow : float
find xlow at ylow
| Methods inherited from Engine |
|---|
- setWalker( kw, problem, allpars, logL, walker=None, fitIndex=None )
- 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, nap )
- getUnitRange( problem, lowLhood, nap )
- printIter( iteration=0, repiter=1000 )