ExponentialPrior

 
ExponentialPrior = class ExponentialPrior(Prior)
    ExponentialPrior(scale=1.0, prior=None)
 
Exponential prior distribution.
 
    Pr( x ) = exp( -x / scale )
 
By default scale = 1.
 
The domain is [0,+Inf].
In computational practice the domain is limited to about [0,36] scale units
 
domain2unit: u = 1 - exp( - d / scale )
unit2domain: d = -log( 1 - u ) * scale
 
Optionally one can set a zero fraction as the fraction of u where the unit2Domain
method returns a 0.
 
Examples
--------
>>> pr = ExponentialPrior()                     # scale=1.0
>>> pr = ExponentialPrior( scale=5.0 )          # scale=5
 
Attributes
----------
scale : float
    scale of the exponential
zeroFraction : float
    fraction of unit that map to zero in domain and vice versa.
 
Hidden Attributes
-----------------
_shift : float
    shift of the exponential part to make room for zeros.
_uval : float
    random number within [0,zeroFraction].
 
Attributes from Prior
--------------------=
lowLimit, highLimit, deltaP, _lowDomain, _highDomain
 
lowLimit and highLimit cannot be used in this implementation.
 
Author: Do Kester.
 
 
Method resolution order:
ExponentialPrior
Prior
builtins.object

Constructor:
ExponentialPrior( scale=1.0, prior=None )
Constructor.
 
Parameters:
scale : float
    of the exponential
prior : ExponentialPrior
    prior to copy (with new scale if applicable)
Methods defined here:
copy()
Copy the prior
domain2Unit( dval )
Return a value in [0,1] given a value within the valid domain of
a parameter for a Exponential distribution.
 
Parameters
----------
dval : float
    value within the domain of a parameter
isBound()
Return true if the integral over the prior is bound.
logResult( x )
Return a the log of the result of the distribution function to p.
 
Parameters
----------
x : float
    value within the domain of a parameter
partialLog( p )
Return partial derivative of log( Prior ) wrt parameter.
 
Parameters
----------
p : float
    the value
result( x )
Return a the result of the distribution function at x.
 
Parameters
----------
x : float
    value within the domain of a parameter
unit2Domain( uval )
Return a value within the valid domain of the parameter given a value
between [0,1] for a Exponential distribution.
 
Parameters
----------
uval : float
    value within [0,1]

Methods inherited from Prior: