queso-0.53.0
|
A class for handling Bayesian joint PDFs. More...
#include <BayesianJointPdf.h>
Public Member Functions | |
Constructor/Destructor methods | |
BayesianJointPdf (const char *prefix, const BaseJointPdf< V, M > &priorDensity, const BaseScalarFunction< V, M > &likelihoodFunction, double likelihoodExponent, const VectorSet< V, M > &intersectionDomain) | |
Default constructor. More... | |
~BayesianJointPdf () | |
Destructor. More... | |
Math methods | |
double | actualValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const |
Actual value of the PDF (scalar function). More... | |
double | lnValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const |
Computes the logarithm of the value of the function. More... | |
double | computeLogOfNormalizationFactor (unsigned int numSamples, bool updateFactorInternally) const |
TODO: Computes the logarithm of the normalization factor. More... | |
void | setNormalizationStyle (unsigned int value) const |
Sets a value to be used in the normalization style of the prior density PDF (ie, protected attribute m_priorDensity). More... | |
double | lastComputedLogPrior () const |
Returns the logarithm of the last computed Prior value. Access to protected attribute m_lastComputedLogPrior. More... | |
double | lastComputedLogLikelihood () const |
Returns the logarithm of the last computed likelihood value. Access to protected attribute m_lastComputedLogLikelihood. More... | |
Public Member Functions inherited from QUESO::BaseJointPdf< V, M > | |
BaseJointPdf (const char *prefix, const VectorSet< V, M > &domainSet) | |
Default constructor. More... | |
virtual | ~BaseJointPdf () |
Destructor. More... | |
void | setLogOfNormalizationFactor (double value) const |
Sets a logarithmic value to be used in the normalization factor (stored in the protected attribute m_normalizationStyle.) More... | |
Public Member Functions inherited from QUESO::BaseScalarFunction< V, M > | |
BaseScalarFunction (const char *prefix, const VectorSet< V, M > &domainSet) | |
Default constructor. More... | |
virtual | ~BaseScalarFunction () |
Destructor. More... | |
const VectorSet< V, M > & | domainSet () const |
Access to the protected attribute m_domainSet: domain set of the scalar function. More... | |
Protected Attributes | |
const BaseJointPdf< V, M > & | m_priorDensity |
const BaseScalarFunction< V, M > & | m_likelihoodFunction |
double | m_likelihoodExponent |
double | m_lastComputedLogPrior |
double | m_lastComputedLogLikelihood |
V | m_tmpVector1 |
V | m_tmpVector2 |
M * | m_tmpMatrix |
Protected Attributes inherited from QUESO::BaseJointPdf< V, M > | |
unsigned int | m_normalizationStyle |
double | m_logOfNormalizationFactor |
Protected Attributes inherited from QUESO::BaseScalarFunction< V, M > | |
const BaseEnvironment & | m_env |
std::string | m_prefix |
const VectorSet< V, M > & | m_domainSet |
Domain set of the scalar function. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QUESO::BaseJointPdf< V, M > | |
double | commonComputeLogOfNormalizationFactor (unsigned int numSamples, bool updateFactorInternally) const |
Common method (to the derived classes) to compute the logarithm of the normalization factor. More... | |
A class for handling Bayesian joint PDFs.
This class allows the mathematical definition of a Bayesian Joint PDF.
Definition at line 49 of file BayesianJointPdf.h.
QUESO::BayesianJointPdf< V, M >::BayesianJointPdf | ( | const char * | prefix, |
const BaseJointPdf< V, M > & | priorDensity, | ||
const BaseScalarFunction< V, M > & | likelihoodFunction, | ||
double | likelihoodExponent, | ||
const VectorSet< V, M > & | intersectionDomain | ||
) |
Default constructor.
Instantiates an object of this class given a prefix and a scalar function. The domain of the scalar function is assigned to the protected attribute m_domainSet, and the scalar fiction is also itself copied to the protected attribute m_scalarFunction.
Definition at line 33 of file BayesianJointPdf.C.
QUESO::BayesianJointPdf< V, M >::~BayesianJointPdf | ( | ) |
|
virtual |
Actual value of the PDF (scalar function).
If the exponent of the likelihood function (likelihoodExponent) is zero, i.e. the likelihood is constant and unitary, then the actual value is the value of the prior PDF; otherwise, the actual value is scaled (multiplied) by a power of the value of the likelihood function.
Implements QUESO::BaseJointPdf< V, M >.
Definition at line 82 of file BayesianJointPdf.C.
References queso_require_equal_to_msg, and queso_require_msg.
|
virtual |
TODO: Computes the logarithm of the normalization factor.
Implements QUESO::BaseJointPdf< V, M >.
Definition at line 260 of file BayesianJointPdf.C.
References queso_error_msg.
double QUESO::BayesianJointPdf< V, M >::lastComputedLogLikelihood | ( | ) | const |
Returns the logarithm of the last computed likelihood value. Access to protected attribute m_lastComputedLogLikelihood.
Definition at line 75 of file BayesianJointPdf.C.
double QUESO::BayesianJointPdf< V, M >::lastComputedLogPrior | ( | ) | const |
Returns the logarithm of the last computed Prior value. Access to protected attribute m_lastComputedLogPrior.
Definition at line 68 of file BayesianJointPdf.C.
|
virtual |
Computes the logarithm of the value of the function.
Analogously to the method actualValue(), if the exponent of the likelihood function (likelihoodExponent) is zero then the Logarithm of the value of the function is the logarithm of the value of the prior PDF; otherwise, the value is scaled (added) by a power of the value of the likelihood function.
Implements QUESO::BaseJointPdf< V, M >.
Definition at line 141 of file BayesianJointPdf.C.
|
virtual |
Sets a value to be used in the normalization style of the prior density PDF (ie, protected attribute m_priorDensity).
Reimplemented from QUESO::BaseJointPdf< V, M >.
Definition at line 60 of file BayesianJointPdf.C.
|
mutableprotected |
Definition at line 107 of file BayesianJointPdf.h.
|
mutableprotected |
Definition at line 106 of file BayesianJointPdf.h.
|
protected |
Definition at line 105 of file BayesianJointPdf.h.
|
protected |
Definition at line 104 of file BayesianJointPdf.h.
|
protected |
Definition at line 103 of file BayesianJointPdf.h.
|
mutableprotected |
Definition at line 111 of file BayesianJointPdf.h.
|
mutableprotected |
Definition at line 109 of file BayesianJointPdf.h.
|
mutableprotected |
Definition at line 110 of file BayesianJointPdf.h.