template<typename T = double>
UniformPrior class
Uniform distribution prior - minimally informative prior.
Base classes
-
template<typename T = double>class PriorDistribution<double>
- Abstract base class for prior distributions in Bayesian analysis.
Public types
- using distribution_type = boost::math::uniform_distribution<T>
Constructors, destructors, conversion operators
- UniformPrior(T lower, T upper)
Public functions
- auto pdf(T x) const -> T override
- Evaluate the probability density at a given point.
- auto log_pdf(T x) const -> T override
- Evaluate the log probability density.
- auto cdf(T x) const -> T override
- Evaluate the cumulative distribution function.
- auto sample(boost::random::mt19937& gen) const -> T override
- Generate a random sample from the distribution.
- auto mean() const -> T override
- Get the mean of the distribution.
- auto variance() const -> T override
- Get the variance of the distribution.
- auto mode() const -> std::optional<T> override
- Get the mode of the distribution (if exists)
- auto support() const -> std::pair<T, T> override
- Get the support of the distribution.
- auto name() const -> std::string override
- Get the name of the distribution.
- auto clone() const -> std::unique_ptr<PriorDistribution<T>> override
- Clone the distribution.
Function documentation
template<typename T>
T liarsdice:: bayesian:: UniformPrior<T>:: pdf(T x) const override
Evaluate the probability density at a given point.
| Parameters | |
|---|---|
| x | Point at which to evaluate the PDF |
| Returns | Probability density value |
template<typename T>
T liarsdice:: bayesian:: UniformPrior<T>:: log_pdf(T x) const override
Evaluate the log probability density.
| Parameters | |
|---|---|
| x | Point at which to evaluate the log PDF |
| Returns | Log probability density value |
template<typename T>
T liarsdice:: bayesian:: UniformPrior<T>:: cdf(T x) const override
Evaluate the cumulative distribution function.
| Parameters | |
|---|---|
| x | Point at which to evaluate the CDF |
| Returns | Cumulative probability |
template<typename T>
T liarsdice:: bayesian:: UniformPrior<T>:: sample(boost::random::mt19937& gen) const override
Generate a random sample from the distribution.
| Parameters | |
|---|---|
| gen | Random number generator |
| Returns | Random sample |
template<typename T>
std::pair<T, T> liarsdice:: bayesian:: UniformPrior<T>:: support() const override
Get the support of the distribution.
| Returns | Pair of (lower_bound, upper_bound) |
|---|