|
queso-0.50.1
|
This templated class represents a Statistical Inverse Problem. More...
#include <StatisticalInverseProblem.h>

Public Member Functions | |
Constructor/Destructor methods | |
| StatisticalInverseProblem (const char *prefix, const SipOptionsValues *alternativeOptionsValues, const BaseVectorRV< P_V, P_M > &priorRv, const BaseScalarFunction< P_V, P_M > &likelihoodFunction, GenericVectorRV< P_V, P_M > &postRv) | |
| Constructor. More... | |
| ~StatisticalInverseProblem () | |
| Destructor. More... | |
Statistical methods | |
| bool | computeSolutionFlag () const |
| Whether or not compute the solution. More... | |
| void | solveWithBayesMetropolisHastings (const MhOptionsValues *alternativeOptionsValues, const P_V &initialValues, const P_M *initialProposalCovMatrix) |
| Solves the problem through Bayes formula and a Metropolis-Hastings algorithm. More... | |
| void | solveWithBayesMLSampling () |
| Solves with Bayes Multi-Level (ML) sampling. More... | |
| const BaseVectorRV< P_V, P_M > & | priorRv () const |
| Returns the Prior RV; access to private attribute m_priorRv. More... | |
| const GenericVectorRV< P_V, P_M > & | postRv () const |
| Returns the Posterior RV; access to private attribute m_postrRv. More... | |
| double | logEvidence () const |
| Returns the logarithm value of the evidence. Related to ML. More... | |
| double | meanLogLikelihood () const |
| Returns the mean of the logarithm value of the likelihood. Related to ML. More... | |
| double | eig () const |
Private Attributes | |
| const BaseEnvironment & | m_env |
| const BaseVectorRV< P_V, P_M > & | m_priorRv |
| const BaseScalarFunction< P_V, P_M > & | m_likelihoodFunction |
| GenericVectorRV< P_V, P_M > & | m_postRv |
| VectorSet< P_V, P_M > * | m_solutionDomain |
| BaseJointPdf< P_V, P_M > * | m_solutionPdf |
| BaseVectorMdf< P_V, P_M > * | m_subSolutionMdf |
| BaseVectorCdf< P_V, P_M > * | m_subSolutionCdf |
| BaseVectorRealizer< P_V, P_M > * | m_solutionRealizer |
| MetropolisHastingsSG< P_V, P_M > * | m_mhSeqGenerator |
| MLSampling< P_V, P_M > * | m_mlSampler |
| BaseVectorSequence< P_V, P_M > * | m_chain |
| ScalarSequence< double > * | m_logLikelihoodValues |
| ScalarSequence< double > * | m_logTargetValues |
| SipOptionsValues | m_alternativeOptionsValues |
| StatisticalInverseProblemOptions * | m_optionsObj |
I/O methods | |
| void | print (std::ostream &os) const |
| TODO: Prints the sequence. More... | |
| std::ostream & | operator<< (std::ostream &os, const StatisticalInverseProblem< P_V, P_M > &obj) |
This templated class represents a Statistical Inverse Problem.
This class is templated on the type 'P_V' of vector and type 'P_M' of matrix, where 'P_' stands for 'parameter'. Some templated classes might also use 'Q_V' and 'Q_M' when referring to a vector type and a matrix type, where 'Q_' stands for 'quantities of interest'. Conceptually, a statistical inverse problem has two input entities and one output entity.
The input entities of a statistical inverse problem are:
Let
denote the mathematical likelihood function and
denote a vector of parameters. The likelihood function object stores the routine that computes
and whatever data necessary by such routine. The routine in the likelihood function object can compute either the actual value
or the value
. See files 'basic/inc/ScalarFunction.h' and 'stats/inc/JointPdf.h' for more details.
The output entity of a statistical inverse problem is the posterior RV, another instance of class 'BaseVectorRV<P_V,P_M>', which stores the solution according to the Bayesian approach. Upon return from a solution operation, the posterior RV is available through the operation 'postRv()'. Such posterior RV is able to provide:
Definition at line 80 of file StatisticalInverseProblem.h.
| QUESO::StatisticalInverseProblem< P_V, P_M >::StatisticalInverseProblem | ( | const char * | prefix, |
| const SipOptionsValues * | alternativeOptionsValues, | ||
| const BaseVectorRV< P_V, P_M > & | priorRv, | ||
| const BaseScalarFunction< P_V, P_M > & | likelihoodFunction, | ||
| GenericVectorRV< P_V, P_M > & | postRv | ||
| ) |
Constructor.
Requirements: 1) the image set of the vector random variable 'priorRv', 2) the domain set of the likelihood function 'likelihoodFunction' and 3) the image set of the vector random variable 'postRv' should belong to vector spaces of equal dimensions. If the requirements are satisfied, the constructor then reads input options that begin with the string '<prefix>ip_'. If no options input file is provided, the construction assigns alternativeOptionsValues to the options of the SIP.
| prefix | The prefix |
| alternativeOptionsValues | Options (if no input file) |
| priorRv | The prior RV |
| likelihoodFunction | The likelihood function |
| postRv | The posterior RV |
Definition at line 33 of file StatisticalInverseProblem.C.
References UQ_FATAL_TEST_MACRO.
| QUESO::StatisticalInverseProblem< P_V, P_M >::~StatisticalInverseProblem | ( | ) |
Destructor.
Definition at line 101 of file StatisticalInverseProblem.C.
| bool QUESO::StatisticalInverseProblem< P_V, P_M >::computeSolutionFlag | ( | ) | const |
Whether or not compute the solution.
| double QUESO::StatisticalInverseProblem< P_V, P_M >::eig | ( | ) | const |
Definition at line 376 of file StatisticalInverseProblem.C.
References UQ_FATAL_TEST_MACRO.
| double QUESO::StatisticalInverseProblem< P_V, P_M >::logEvidence | ( | ) | const |
Returns the logarithm value of the evidence. Related to ML.
Definition at line 356 of file StatisticalInverseProblem.C.
References UQ_FATAL_TEST_MACRO.
| double QUESO::StatisticalInverseProblem< P_V, P_M >::meanLogLikelihood | ( | ) | const |
Returns the mean of the logarithm value of the likelihood. Related to ML.
Definition at line 366 of file StatisticalInverseProblem.C.
References UQ_FATAL_TEST_MACRO.
| const GenericVectorRV< P_V, P_M > & QUESO::StatisticalInverseProblem< P_V, P_M >::postRv | ( | ) | const |
Returns the Posterior RV; access to private attribute m_postrRv.
The Posterior RV contains the solution of the Bayes problem.
Definition at line 350 of file StatisticalInverseProblem.C.
| void QUESO::StatisticalInverseProblem< P_V, P_M >::print | ( | std::ostream & | os | ) | const |
TODO: Prints the sequence.
Definition at line 387 of file StatisticalInverseProblem.C.
| const BaseVectorRV< P_V, P_M > & QUESO::StatisticalInverseProblem< P_V, P_M >::priorRv | ( | ) | const |
Returns the Prior RV; access to private attribute m_priorRv.
Definition at line 343 of file StatisticalInverseProblem.C.
| void QUESO::StatisticalInverseProblem< P_V, P_M >::solveWithBayesMetropolisHastings | ( | const MhOptionsValues * | alternativeOptionsValues, |
| const P_V & | initialValues, | ||
| const P_M * | initialProposalCovMatrix | ||
| ) |
Solves the problem through Bayes formula and a Metropolis-Hastings algorithm.
Requirements: 1) 'initialValues' should have the same number of components as member variable 'm_priorRv' and 2) if 'initialProposalCovMatrix' is not NULL, it should be square and its size should be equal to the size of 'initialValues'. If the requirements are satisfied, this methods checks the member flag 'm_computeSolution' (one of the options read from the input file during construction). If the flag is 'false', the operation returns immediately, computing nothing; otherwise, the operation sets the member variable 'm_postRv' accordingly. The operation:
Definition at line 127 of file StatisticalInverseProblem.C.
References QUESO::InstantiateIntersection(), UQ_FATAL_TEST_MACRO, and UQ_SIP_FILENAME_FOR_NO_FILE.
| void QUESO::StatisticalInverseProblem< P_V, P_M >::solveWithBayesMLSampling | ( | ) |
Solves with Bayes Multi-Level (ML) sampling.
Definition at line 272 of file StatisticalInverseProblem.C.
References QUESO::InstantiateIntersection().
|
friend |
Definition at line 150 of file StatisticalInverseProblem.h.
|
private |
Definition at line 175 of file StatisticalInverseProblem.h.
|
private |
Definition at line 171 of file StatisticalInverseProblem.h.
|
private |
Definition at line 157 of file StatisticalInverseProblem.h.
|
private |
Definition at line 160 of file StatisticalInverseProblem.h.
|
private |
Definition at line 172 of file StatisticalInverseProblem.h.
|
private |
Definition at line 173 of file StatisticalInverseProblem.h.
|
private |
Definition at line 169 of file StatisticalInverseProblem.h.
|
private |
Definition at line 170 of file StatisticalInverseProblem.h.
|
private |
Definition at line 176 of file StatisticalInverseProblem.h.
|
private |
Definition at line 161 of file StatisticalInverseProblem.h.
|
private |
Definition at line 159 of file StatisticalInverseProblem.h.
|
private |
Definition at line 163 of file StatisticalInverseProblem.h.
|
private |
Definition at line 164 of file StatisticalInverseProblem.h.
|
private |
Definition at line 167 of file StatisticalInverseProblem.h.
|
private |
Definition at line 166 of file StatisticalInverseProblem.h.
|
private |
Definition at line 165 of file StatisticalInverseProblem.h.