Package csb :: Package statistics :: Module scalemixture :: Class InvGammaPosteriorSampler |
[frames] | no frames]

# Class InvGammaPosteriorSampler

source code

                object --+
                         |
     pdf.AbstractEstimator --+
                             |
    ScaleMixturePriorEstimator --+
                                 |
                                InvGammaPosteriorSampler

Nested Classes
Inherited from `pdf.AbstractEstimator`: `__metaclass__`

Instance Methods
__init__(self) x.__init__(...) initializes x; see help(type(x)) for signature | source code
AbstractDensity |
estimate(self, context, data) Generate samples from the posterior of alpha and beta. | source code
get_scale_estimator(self) Return an appropriate estimator for the scales of the mixture distribution under this prior. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
| __abstractmethods__ = ``frozenset([``])``

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Overrides: object.__init__ (inherited documentation)

### estimate(self, context, data) | source code
Generate samples from the posterior of alpha and beta. For beta the posterior is a gamma distribution and analytically acessible. The posterior of alpha can not be expressed analytically and is aproximated using adaptive rejection sampling. Parameters: `context` - context distribution `data` - sample values Returns: AbstractDensity a new distribution, initialized with the estimated parameters Raises: `EstimationFailureError` - if estimation is not possible Overrides: pdf.AbstractEstimator.estimate

### get_scale_estimator(self) | source code
Return an appropriate estimator for the scales of the mixture distribution under this prior. Overrides: ScaleMixturePriorEstimator.get_scale_estimator (inherited documentation)