class PhantomCollection( object ) | Source |
---|
Helper class for NestedSamplers Engines to collect all trial walkers
obtained during the NS run. They are kept ordered according to their logL.
They are used to find the minimum and maximum values
of the parameter settings as function of the likelihood.
There are different methods for static models and for dynamic models.
For dynamic models only parameter sets of the proper length are searched. The kth item in self.logL belongs to the kth list in self.pars. If the model had np parameters then self.logL[np][k] pertain to self.pars[np][k,:] which has np items
For static models there is only one array of self.logL and one 2-d array od self.pars.
Attributes
- phantoms : WalkerList or dict of { int : WalkerList }
int number of parameters in the model
Wlakerlist list of (phantom) walkers - paramMin : array_like or None
minimum values of the parameters at this stage of lowLhood
None if too few items of this parameter length is present - paramMax : array_like or None
maximum values of the parameters at this stage of lowLhood
None if too few items of this parameter length is present
Author Do Kester.
PhantomCollection( dynamic=False ) |
---|
Constructor.
Parameters
- dynamic : bool
whether it is a dynamic model
length( np=0 ) |
---|
Parameters
- np : int
number of parameters (in case of dynamic only)
getList( walker ) |
---|
Parameters
- walker : Walker
return list pertaining to this walker (not used here)
storeItems( walker ) |
---|
Parameters
- walker : Walker
to be added to the PhantomCollection
calculateParamMinmax( lowLhood, np=0 ) |
---|
Parameters
- lowLhood : float
lower boundary of the log Likelihood - np : int
number of parameters (not used in this implementation)
getParamMinmax( lowLhood, np=0 ) |
---|
Parameters
- lowLhood : float
lower boundary of the log Likelihood - np : int
number of parameters (not used in this implementation)
lengthDynamic( np=None ) |
---|
Parameters
- np : int
number of parameters (in case of dynamic only)
getDynamicList( walker ) |
---|
Parameters
- walker : Walker
return list pertaining to this walker
storeDynamic( walker ) |
---|
Parameters
- logL : float
log Likelihood - pars : 1d array
parameters
calculateDynamic( lowLhood, np=0 ) |
---|
Parameters
- lowLhood : float
lower boundary of the log Likelihood - np : int
number of parameters
getDynamic( lowLhood, np=0 ) |
---|
Parameters
- lowLhood : float
lower boundary of the log Likelihood - np : int
number of parameters