-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
ExponentialClassFamily: posterior predictive distribution
Task
Add generic support for computing posterior predictive distributions for ExponentialClassFamily using only A, T, h and the sample.
Requirements
1. Method signature
Add a method:
posterior_predictive(prior_hyperparameters, sample),
which:
- takes:
- prior hyperparameters (same representation as in
posterior_hyperparameters), - a sample of observations from the model,
- prior hyperparameters (same representation as in
- returns:
- an object representing the posterior predictive distribution.
The return type should be consistent with the rest of the library, e.g.:
- another
ParametricFamily, - or a small “predictive” wrapper that implements at least
pdf/pmf,cdf, sampling, etc.
2. Use only exponential-family structure
The implementation must rely only on:
- the exponential-family representation:
A(θ),T(x),h(x),
- and the updated posterior hyperparameters (from
posterior_hyperparameters).
In other words, posterior_predictive should not require hard-coded formulas for specific distributions; instead, it should:
- use generic relationships between the model and its conjugate prior in exponential families.
3. Conceptual behaviour
Conceptually, for an exponential family with conjugate prior:
- the posterior predictive density is:
p(x_new | sample, prior) = ∫ f(x_new | θ) * p(θ | sample, prior) dθ.
posterior_predictive must encode this object in the library’s abstractions, not necessarily evaluate the integral symbolically.
Implementation-wise, you can:
- reuse the same parametrization as the original family, but with hyperparameters “integrated out”,
- or define a dedicated predictive-family wrapper that knows how to evaluate predictive
pdf/pmfat a given point usingA,T,hand hyperparameters.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status