UniformPrior = class UniformPrior(Prior) |
|
UniformPrior(limits=None, circular=False, prior=None)
Uniform prior distribution, for location parameters.
A uniform prior is a improper prior ( i.e. its integral is unbound ).
Because of that it always needs limits, low and high, such that
-Inf < low < high < +Inf.
Pr( x ) = 1 / ( high - low ) if low < x < high
0 elsewhere
domain2Unit: u = ( d - lo ) / range
unit2Domain: d = u * range + lo
Examples
--------
>>> pr = UniformPrior() # unbound prior
>>> pr = UniformPrior( limits=[0,10] ) # limited to the range [0,10]
>>> pr = UniformPrior( circular=math.pi ) # circular between 0 and pi
>>> pr = UniformPrior( limits=[2,4], circular=True ) # circular between 2 and 4
Attributes
----------
_range : float
highlimit - lowlimit
Attributes from Prior
--------------------=
lowLimit, highLimit, deltaP, _lowDomain, _highDomain |
|
- Method resolution order:
- UniformPrior
- Prior
- builtins.object
Constructor:
- UniformPrior( limits=None, circular=False, prior=None )
- Constructor.
Parameters
----------
limits : None or [float,float]
None no limits are set
2 floats lowlimit and highlimit
circular : bool or float
True : circular with period from limits[0] to limits[1]
float : period of circularity
prior : UniformPrior
to be copied
Methods defined here:
- copy()
- Return a (deep) copy of it.
- domain2Unit( dval )
- Return the dval as uval
In Prior.limitedDomain2Unit the dval is transformed into a uval
Parameters
----------
dval : float
value within the domain of a parameter
- getIntegral()
- Return integral of UniformPrior 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 the uval as dval
In Prior.limitedUnit2Domain the uval is transformed into a dval
Parameters
----------
uval : float
value within [0,1]
Methods inherited from Prior:
|
|