CauchyPrior = class CauchyPrior(Prior) |
|
CauchyPrior(center=0.0, scale=1, limits=None, circular=False, prior=None)
Cauchy prior distribution.
Pr( x ) = s / ( π * ( s^2 + ( x - c )^2 )
By default: c = center = 0 and s = scale = 1.
It can also have a limited domain. (To be done)
By default the domain is [-Inf,+Inf].
In computational practice it is limited to [-1e16, 1e16]
domain2unit: u = arctan( ( d - c ) / s ) / pi + 0.5
unit2domain: d = tan( ( u - 0.5 ) * pi ) * s + c
Examples
--------
>>> pr = CauchyPrior() # center=0, scale=1
>>> pr = CauchyPrior( center=1.0, scale=0.5 )
>>> pr = CauchyPrior( limits=[0,None] ) # lowlimit=0, highlimit=inf
>>> pr = CauchyPrior( center=1, circular=3 ) # circular between 0.5 and 2.5
Attributes
----------
center : float
center of the Cauchy prior
scale : float
scale of the Cauchy prior
Attributes from Prior
--------------------=
lowLimit, highLimit, deltaP, _lowDomain, _highDomain
lowLimit and highLimit cannot be used in this implementation. |
|
- Method resolution order:
- CauchyPrior
- Prior
- builtins.object
Constructor:
- CauchyPrior( center=0.0, scale=1, limits=None, circular=False, prior=None )
- Constructor.
Parameters
----------
center : float
of the prior
scale : float
of the prior
limits : None or [float,float]
None no limits are set
2 floats lowlimit and highlimit
circular : bool or float
bool : y|n circular with period from limits[0] to limits[1]
float : period of circularity
prior : CauchyPrior
prior to copy (with new scale 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 Cauchy distribution.
domain2unit: u = arctan( ( d - c ) / s ) / pi + 0.5
Parameters
----------
dval : float
value within the domain of a parameter
- isBound()
- Return true if the integral over the prior is bound.
- partialLog( x )
- Return partial derivative of log( Prior ) wrt parameter.
Parameters
----------
x : 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 Cauchy distribution.
unit2domain: d = tan( ( u - 0.5 ) * pi ) * s + c
Parameters
----------
uval : float
value within [0,1]
Methods inherited from Prior:
|
|