Package gmisclib :: Module mcmc_idxr :: Class Expo
[frames] | no frames]

Class Expo

source code


Exponential distribution

Instance Methods
 
__init__(self, lmbda)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
float
__call__(self)
Sample from the probability distribution.
source code
float
logdens(self, x)
Return the log(density) of the probability distribution at x.
source code
 
__doc__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, lmbda)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • lmbda (float) - 1/the_mean (also 1/the_standard_deviation )
Raises:
  • ValueError - Bad parameters for the distribution.
Overrides: object.__init__

__call__(self)
(Call operator)

source code 

Sample from the probability distribution.

Returns: float
the sample
Overrides: probdist_c.__call__
(inherited documentation)

logdens(self, x)

source code 

Return the log(density) of the probability distribution at x.

Parameters:
  • x - the position where the density should be evaluated.
Returns: float
log(density)
Raises:
Overrides: probdist_c.logdens
(inherited documentation)

__doc__(self)

source code 
Decorators:
  • @property