template<typename T = double>
PoissonLikelihood class
Poisson likelihood for count data.
Models the number of events in a fixed interval
Base classes
-
template<typename T = double>class LikelihoodFunction<double>
- Abstract base class for likelihood functions in Bayesian analysis.
Public functions
- auto evaluate(T theta, T observation) const -> T override
- Evaluate likelihood for a single observation.
-
auto evaluate(T theta,
const vector_
type& observations) const -> T override - Evaluate likelihood for multiple observations.
-
auto sufficient_statistics(const vector_
type& observations) const -> vector_ type override - Get the sufficient statistics for the data.
- auto family() const -> std::string override
- Get the family name of the likelihood.
- auto clone() const -> std::unique_ptr<LikelihoodFunction<T>> override
- Clone the likelihood function.
- auto has_conjugate_prior() const -> bool override
- Check if the likelihood has a conjugate prior.
- auto conjugate_prior_family() const -> std::optional<std::string> override
- Get the name of the conjugate prior family (if exists)
Function documentation
template<typename T>
T liarsdice:: bayesian:: PoissonLikelihood<T>:: evaluate(T theta,
T observation) const override
Evaluate likelihood for a single observation.
| Parameters | |
|---|---|
| theta | Parameter value |
| observation | Single data point |
| Returns | Likelihood value |
template<typename T>
T liarsdice:: bayesian:: PoissonLikelihood<T>:: evaluate(T theta,
const vector_ type& observations) const override
Evaluate likelihood for multiple observations.
| Parameters | |
|---|---|
| theta | Parameter value |
| observations | Vector of data points |
| Returns | Combined likelihood value |
template<typename T>
vector_ type liarsdice:: bayesian:: PoissonLikelihood<T>:: sufficient_statistics(const vector_ type& observations) const override
Get the sufficient statistics for the data.
| Parameters | |
|---|---|
| observations | Data points |
| Returns | Vector of sufficient statistics |