|
CMP++: Uncertainty Quantification & Bayesian Calibration
|
Represents the product (sum of logs) of two independent prior distributions. More...
#include <prior++.h>


Public Member Functions | |
| Product ()=default | |
| Product (const Product &)=default | |
| Product (Product &&)=default | |
| Product & | operator= (const Product &)=default |
| Product & | operator= (Product &&)=default |
| Product (std::shared_ptr< Prior > p1, std::shared_ptr< Prior > p2) | |
| double | eval (const Eigen::VectorXd &par) const |
| double | evalGradient (const Eigen::VectorXd &par, const size_t &i) const |
| double | evalHessian (const Eigen::VectorXd &par, const size_t &i, const size_t &j) const |
Public Member Functions inherited from cmp::prior::Prior | |
| virtual | ~Prior ()=default |
Static Public Member Functions | |
| static std::shared_ptr< Prior > | make (std::shared_ptr< Prior > p1, std::shared_ptr< Prior > p2) |
Private Attributes | |
| std::shared_ptr< Prior > | leftPrior_ |
| Left factor independent prior. | |
| std::shared_ptr< Prior > | rightPrior_ |
| Right factor independent prior. | |
Represents the product (sum of logs) of two independent prior distributions.
Mathematical Formulation For independent priors \( p_1(\theta) \) and \( p_2(\theta) \), the joint prior is:
\[ \log p(\theta) = \log p_1(\theta) + \log p_2(\theta) \]
Derivatives are additive due to the linearity of differentiation:
\[ \nabla_i \log p(\theta) = \nabla_i \log p_1(\theta) + \nabla_i \log p_2(\theta) \]
\[ \mathcal{H}_{ij} \log p(\theta) = \mathcal{H}_{ij} \log p_1(\theta) + \mathcal{H}_{ij} \log p_2(\theta) \]
Implementation Algorithm Evaluates the log-prior, gradient, and Hessian by summing the results of the leftPrior_ and rightPrior_ objects.
|
default |
|
default |
|
default |
|
inlinevirtual |
Implements cmp::prior::Prior.
|
inlinevirtual |
Implements cmp::prior::Prior.
|
inlinevirtual |
Implements cmp::prior::Prior.
|
inlinestatic |
|
private |
Left factor independent prior.
|
private |
Right factor independent prior.