queso-0.57.1
|
This class allows the representation of the MALA transition kernel with a scaled covariance matrix for the purposes of delayed rejection. More...
#include <MetropolisAdjustedLangevinTK.h>
Public Member Functions | |
Constructor/Destructor methods | |
MetropolisAdjustedLangevinTK (const char *prefix, const BayesianJointPdf< V, M > &targetPdf, const std::vector< double > &scales, const M &covMatrix) | |
Default constructor. More... | |
~MetropolisAdjustedLangevinTK () | |
Destructor. More... | |
Statistical/Mathematical methods | |
bool | symmetric () const |
Whether or not the matrix is symmetric. Always 'true'. More... | |
const GaussianVectorRV< V, M > & | rv (unsigned int stageId) const |
Gaussian increment property to construct a transition kernel. More... | |
const GaussianVectorRV< V, M > & | rv (const std::vector< unsigned int > &stageIds) |
Gaussian increment property to construct a transition kernel. More... | |
virtual const GaussianVectorRV < V, M > & | rv (const V &position) const |
Constructs transition kernel pdf based on internal m_stageId variable. More... | |
void | updateLawCovMatrix (const M &covMatrix) |
Scales the covariance matrix. More... | |
Misc methods | |
bool | setPreComputingPosition (const V &position, unsigned int stageId) |
Sets the pre-computing positions m_preComputingPositions [stageId] with a new vector of size position . More... | |
void | clearPreComputingPositions () |
Clears the pre-computing positions m_preComputingPositions [stageId]. More... | |
virtual bool | covMatrixIsDirty () |
virtual void | cleanCovMatrix () |
I/O methods | |
void | print (std::ostream &os) const |
TODO: Prints the transition kernel. More... | |
Public Member Functions inherited from QUESO::BaseTKGroup< V, M > | |
BaseTKGroup () | |
Default constructor. More... | |
BaseTKGroup (const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< double > &scales) | |
Constructor. More... | |
virtual | ~BaseTKGroup () |
Destructor. More... | |
const BaseEnvironment & | env () const |
QUESO's environment. More... | |
const V & | preComputingPosition (unsigned int stageId) const |
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId]. More... | |
virtual unsigned int | set_dr_stage (unsigned int stageId) |
Does nothing. Subclasses may re-implement. Returns the current stage id. More... | |
virtual void | updateTK () |
Private Member Functions | |
void | setRVsWithZeroMean () |
Sets the mean of the RVs to zero. More... | |
Private Attributes | |
M | m_originalCovMatrix |
const BayesianJointPdf< V, M > & | m_targetPdf |
double | m_time_step |
Additional Inherited Members | |
Protected Attributes inherited from QUESO::BaseTKGroup< V, M > | |
const EmptyEnvironment * | m_emptyEnv |
const BaseEnvironment & | m_env |
std::string | m_prefix |
const VectorSpace< V, M > * | m_vectorSpace |
std::vector< double > | m_scales |
std::vector< const V * > | m_preComputingPositions |
std::vector< BaseVectorRV< V, M > * > | m_rvs |
unsigned int | m_stageId |
This class allows the representation of the MALA transition kernel with a scaled covariance matrix for the purposes of delayed rejection.
Definition at line 43 of file MetropolisAdjustedLangevinTK.h.
QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK | ( | const char * | prefix, |
const BayesianJointPdf< V, M > & | targetPdf, | ||
const std::vector< double > & | scales, | ||
const M & | covMatrix | ||
) |
Default constructor.
Definition at line 34 of file MetropolisAdjustedLangevinTK.C.
References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseTKGroup< V, M >::m_env, QUESO::MetropolisAdjustedLangevinTK< V, M >::m_originalCovMatrix, QUESO::BaseTKGroup< V, M >::m_preComputingPositions, QUESO::BaseTKGroup< V, M >::m_rvs, QUESO::BaseTKGroup< V, M >::m_scales, QUESO::MetropolisAdjustedLangevinTK< V, M >::setRVsWithZeroMean(), and QUESO::BaseEnvironment::subDisplayFile().
QUESO::MetropolisAdjustedLangevinTK< V, M >::~MetropolisAdjustedLangevinTK | ( | ) |
|
inlinevirtual |
Performs whatever cleanup is needed (usually just resetting an internal bool flag) after the covariance matrix was modified.
After this method is called, covMatrixIsDirty should return true
.
Implements QUESO::BaseTKGroup< V, M >.
Definition at line 90 of file MetropolisAdjustedLangevinTK.h.
|
virtual |
Clears the pre-computing positions m_preComputingPositions
[stageId].
Reimplemented from QUESO::BaseTKGroup< V, M >.
Definition at line 223 of file MetropolisAdjustedLangevinTK.C.
References QUESO::BaseTKGroup< V, M >::clearPreComputingPositions().
|
inlinevirtual |
This method determines whether or not the user has 'dirtied' the covariance matrix, thereby necessitating an AM reset.
Should return true if the cov matrix was modified in such a way to affect the Adaptive Metropolis sample covariance calculation.
Implements QUESO::BaseTKGroup< V, M >.
Definition at line 89 of file MetropolisAdjustedLangevinTK.h.
|
virtual |
TODO: Prints the transition kernel.
Reimplemented from QUESO::BaseTKGroup< V, M >.
Definition at line 247 of file MetropolisAdjustedLangevinTK.C.
References QUESO::BaseTKGroup< V, M >::print().
|
virtual |
Gaussian increment property to construct a transition kernel.
Implements QUESO::BaseTKGroup< V, M >.
Definition at line 81 of file MetropolisAdjustedLangevinTK.C.
References QUESO::GaussianVectorRV< V, M >::updateLawExpVector().
|
virtual |
Gaussian increment property to construct a transition kernel.
Implements QUESO::BaseTKGroup< V, M >.
Definition at line 106 of file MetropolisAdjustedLangevinTK.C.
References QUESO::GaussianVectorRV< V, M >::updateLawExpVector().
|
virtual |
Constructs transition kernel pdf based on internal m_stageId
variable.
Implements QUESO::BaseTKGroup< V, M >.
Definition at line 132 of file MetropolisAdjustedLangevinTK.C.
References QUESO::GaussianVectorRV< V, M >::updateLawExpVector().
|
virtual |
Sets the pre-computing positions m_preComputingPositions
[stageId] with a new vector of size position
.
Reimplemented from QUESO::BaseTKGroup< V, M >.
Definition at line 185 of file MetropolisAdjustedLangevinTK.C.
References QUESO::GaussianJointPdf< V, M >::lawCovMatrix(), and QUESO::BaseTKGroup< V, M >::setPreComputingPosition().
|
private |
Sets the mean of the RVs to zero.
Definition at line 230 of file MetropolisAdjustedLangevinTK.C.
Referenced by QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK().
|
virtual |
Whether or not the matrix is symmetric. Always 'true'.
Implements QUESO::BaseTKGroup< V, M >.
Definition at line 74 of file MetropolisAdjustedLangevinTK.C.
void QUESO::MetropolisAdjustedLangevinTK< V, M >::updateLawCovMatrix | ( | const M & | covMatrix | ) |
Scales the covariance matrix.
The covariance matrix is scaled by a factor of \( 1/scales^2 \).
Definition at line 164 of file MetropolisAdjustedLangevinTK.C.
|
private |
Definition at line 109 of file MetropolisAdjustedLangevinTK.h.
Referenced by QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK().
|
private |
Definition at line 111 of file MetropolisAdjustedLangevinTK.h.
|
private |
Definition at line 113 of file MetropolisAdjustedLangevinTK.h.