Navigation
class HyperParameter( object ) | Source |
---|
Values and priors for the parameter(s) of an ErrorDistribution.
Hyperparameters are not directly related to the model, they are parameters of the error distribution.
Information about the scale of the noise is stored in a derived class, noiseScale.
The full use of priors is reserved for Bayesian calculations as in NestedSampler
Attributes
- hypar : float
the value of the hyperparameter. Default: 1.0 - stdev : float
the standard deviation of the hyperparameter. Default: None - prior : Prior
the prior for the hyperparameter. - isFixed : boolean
keep the hyperparameter fixed at the value given by hypar.
default: True
HyperParameter( hypar=1, isFixed=True, prior=None, limits=None, copy=None ) |
---|
Constructor.
Parameters
- hypar : float
value of the hyperparameter - isFixed : bool
True: Consider the hyperparameter as fixed
False: Optimize the parameter too (when relevant)
It might need a prior and/or limits to be set - prior : None or Prior
None : no prior is set if no limits are given else JeffreysPrior
prior probability on the hyperparameter - limits : None or list of 2 floats [lo,hi]
low limit and high limit on hypar. - copy : HyperParameter
HyperParameter to copy
copy( ) |
---|
checkPrior( ) |
---|
ValueError when no prior has been set.
setLimits( limits ) |
---|
Parameters
- limits : list of 2 float
the [low,high] limits.
getLimits( ) |
---|
Return the limits on the scale.
isBound( ) |
---|
Return true is the itergral over the prior is bound.
domain2Unit( dval ) |
---|
Parameters
- dval : float
value within the domain of a parameter
unit2Domain( uval ) |
---|
Parameters
- uval : float
value within [0,1]
partialDomain2Unit( dval ) |
---|
Parameters
- dval : float
value within the domain of a parameter