queso-0.56.0
MetropolisAdjustedLangevinTK.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_MALA_TK_H
26 #define UQ_MALA_TK_H
27 
28 #include <queso/TKGroup.h>
29 
30 namespace QUESO {
31 
32 class GslVector;
33 class GslMatrix;
34 template <class V, class M> class BayseianJointPdf;
35 
42 template <class V = GslVector, class M = GslMatrix>
44 public:
46 
47  MetropolisAdjustedLangevinTK(const char * prefix,
49  const BayesianJointPdf<V, M> & targetPdf,
50  const std::vector<double> & scales,
51  const M & covMatrix);
55 
57 
58 
60  bool symmetric() const;
61 
63  const GaussianVectorRV<V, M> & rv(unsigned int stageId) const;
64 
66  const GaussianVectorRV<V, M> & rv(const std::vector<unsigned int> & stageIds);
67 
69  /*
70  * This uses the formula for the transition kernel in Roberts & Tweedie 2001.
71  *
72  * http://projecteuclid.org/download/pdf_1/euclid.bj/1178291835
73  */
74  virtual const GaussianVectorRV<V, M> & rv(const V & position) const;
75 
77 
78  void updateLawCovMatrix(const M & covMatrix);
80 
82 
83  bool setPreComputingPosition(const V & position, unsigned int stageId);
85 
89 
91 
92 
94  void print(std::ostream & os) const;
96 private:
98  void setRVsWithZeroMean();
105 
107 
109 
110  double m_time_step;
111 };
112 
113 } // End namespace QUESO
114 
115 #endif // UQ_MALA_TK_H
A class for handling Bayesian joint PDFs.
void print(std::ostream &os) const
TODO: Prints the transition kernel.
void clearPreComputingPositions()
Clears the pre-computing positions m_preComputingPositions[stageId].
bool symmetric() const
Whether or not the matrix is symmetric. Always &#39;true&#39;.
This base class allows the representation of a transition kernel.
Definition: Algorithm.h:32
This class allows the representation of the MALA transition kernel with a scaled covariance matrix fo...
A class representing a Gaussian vector RV.
void updateLawCovMatrix(const M &covMatrix)
Scales the covariance matrix.
bool setPreComputingPosition(const V &position, unsigned int stageId)
Sets the pre-computing positions m_preComputingPositions[stageId] with a new vector of size position...
void setRVsWithZeroMean()
Sets the mean of the RVs to zero.
const BayesianJointPdf< V, M > & m_targetPdf
const GaussianVectorRV< V, M > & rv(unsigned int stageId) const
Gaussian increment property to construct a transition kernel.
MetropolisAdjustedLangevinTK(const char *prefix, const BayesianJointPdf< V, M > &targetPdf, const std::vector< double > &scales, const M &covMatrix)
Default constructor.

Generated on Tue Nov 29 2016 10:53:11 for queso-0.56.0 by  doxygen 1.8.5