JeffreysPrior = class JeffreysPrior(Prior) |
|
JeffreysPrior(limits=None, prior=None)
Jeffreys prior distribution, for scale-like parameters.
Jeffreys prior is a improper prior ( i.e. its integral is unbound ).
Because of that it always needs limits, low and high, such that
0 < low < high < +Inf.
Pr( x ) = 1.0 / ( x * norm ) if low < x < high
0.0 otherwise
where norm = log( high ) - log( low )
No limits are set by default.
domain2unit: u = ( log( d ) - log( lo ) ) / ( log( hi ) - log( lo ) );
unit2domain: d = exp( u * ( log( hi ) - log( lo ) ) + log( lo ) );
Examples
--------
>>> pr = JeffreysPrior() # unbound prior
>>> pr = JeffreysPrior( limits=[0.1,1.0] ) # limited to the range [0.1,1.0]
Hidden Attributes
-----------------
_logLo : float
log( lowLimit )
_norm : float
log( highLimit / lowLimit )
Attributes from Prior
--------------------=
lowLimit, highLimit, deltaP, _lowDomain, _highDomain
The default of lowLimit and _lowDomain is zero. |
|
- Method resolution order:
- JeffreysPrior
- Prior
- builtins.object
Constructor:
- JeffreysPrior( limits=None, prior=None )
- Default constructor.
Parameters
----------
limits : list of 2 floats
2 limits resp. low and high
prior : JeffreysPrior
prior to copy (with new limits if applicable)
Methods defined here:
- copy()
- Return a copy
- domain2Unit( dval )
- Return a value in [0,1] given a value within the valid domain of
a parameter for a Jeffreys distribution.
Parameters
----------
dval : float
value within the domain of a parameter
- getIntegral()
- Return the integral of JeffreysPrior from lowLimit to highLimit.
- isBound()
- Return true if the integral over the prior is bound.
- 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
- shortName()
- Return a string representation of the prior.
- unit2Domain( uval )
- Return a value within the valid domain of the parameter given a value
between [0,1] for a Jeffreys distribution.
Parameters
----------
uval : float
value within [0,1]
Methods inherited from Prior:
|
|