queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
StatisticalInverseProblem.C
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-2017 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 #include <queso/StatisticalInverseProblem.h>
26 #include <queso/GslVector.h>
27 #include <queso/GslMatrix.h>
28 #include <queso/GPMSA.h>
29 #include <queso/GslOptimizer.h>
30 #include <queso/OptimizerMonitor.h>
31 #include <queso/BayesianJointPdf.h>
32 
33 namespace QUESO {
34 
35 // Default constructor -----------------------------
36 template <class P_V,class P_M>
37 StatisticalInverseProblem<P_V,P_M>::StatisticalInverseProblem( const char* prefix, const SipOptionsValues* alternativeOptionsValues, // dakota const BaseVectorRV <P_V,P_M>& priorRv, const BaseScalarFunction<P_V,P_M>& likelihoodFunction, GenericVectorRV <P_V,P_M>& postRv)
43  :
44  m_env (priorRv.env()),
45  m_priorRv (priorRv),
46  m_likelihoodFunction (likelihoodFunction),
47  m_postRv (postRv),
48  m_solutionDomain (),
49  m_solutionPdf (),
50  m_subSolutionMdf (),
51  m_subSolutionCdf (),
52  m_solutionRealizer (),
53  m_mhSeqGenerator (),
54  m_mlSampler (),
55  m_chain (),
56  m_logLikelihoodValues (),
57  m_logTargetValues (),
58  m_optionsObj (),
59  m_seedWithMAPEstimator (false)
60 {
61 #ifdef QUESO_MEMORY_DEBUGGING
62  std::cout << "Entering Sip" << std::endl;
63 #endif
64  if (m_env.subDisplayFile()) {
65  *m_env.subDisplayFile() << "Entering StatisticalInverseProblem<P_V,P_M>::constructor()"
66  << ": prefix = " << prefix
67  << ", alternativeOptionsValues = " << alternativeOptionsValues
68  << ", m_env.optionsInputFileName() = " << m_env.optionsInputFileName()
69  << std::endl;
70  }
71 
72  // If NULL, we create one
73  if (m_optionsObj == NULL) {
74  m_optionsObj.reset(new SipOptionsValues(&m_env, prefix));
75  }
76  else {
77  // If the user passed in a legitimate options object, then copy it into a
78  // ScopedPtr
79  m_optionsObj.reset(new SipOptionsValues(*alternativeOptionsValues));
80  }
81 
82  if (m_optionsObj->m_help != "") {
83  if (m_env.subDisplayFile()) {
84  *m_env.subDisplayFile() << (*m_optionsObj) << std::endl;
85  }
86  }
87 
88 #ifdef QUESO_MEMORY_DEBUGGING
89  std::cout << "In Sip, finished scanning options" << std::endl;
90 #endif
91 
92  queso_require_equal_to_msg(priorRv.imageSet().vectorSpace().dimLocal(), likelihoodFunction.domainSet().vectorSpace().dimLocal(), "'priorRv' and 'likelihoodFunction' are related to vector spaces of different dimensions");
93 
94  queso_require_equal_to_msg(priorRv.imageSet().vectorSpace().dimLocal(), postRv.imageSet().vectorSpace().dimLocal(), "'priorRv' and 'postRv' are related to vector spaces of different dimensions");
95 
96  if (m_env.subDisplayFile()) {
97  *m_env.subDisplayFile() << "Leaving StatisticalInverseProblem<P_V,P_M>::constructor()"
98  << ": prefix = " << m_optionsObj->m_prefix
99  << std::endl;
100  }
101 
102  return;
103 }
104 
105 template <class P_V,class P_M>
107  const char * prefix,
108  const SipOptionsValues * alternativeOptionsValues,
109  const GPMSAFactory<P_V, P_M> & gpmsaFactory,
110  GenericVectorRV <P_V,P_M> & postRv)
111  :
112  m_env (gpmsaFactory.m_totalPrior->env()),
113  m_priorRv (*(gpmsaFactory.m_totalPrior)),
114  m_likelihoodFunction (gpmsaFactory.getGPMSAEmulator()),
115  m_postRv (postRv),
116  m_solutionDomain (),
117  m_solutionPdf (),
118  m_subSolutionMdf (),
119  m_subSolutionCdf (),
120  m_solutionRealizer (),
121  m_mhSeqGenerator (),
122  m_mlSampler (),
123  m_chain (),
124  m_logLikelihoodValues (),
125  m_logTargetValues (),
126  m_optionsObj (),
127  m_seedWithMAPEstimator (false)
128 {
129  if (m_env.subDisplayFile()) {
130  *m_env.subDisplayFile() << "Entering StatisticalInverseProblem<P_V,P_M>::constructor()"
131  << ": prefix = " << prefix
132  << ", alternativeOptionsValues = " << alternativeOptionsValues
133  << ", m_env.optionsInputFileName() = " << m_env.optionsInputFileName()
134  << std::endl;
135  }
136 
137  // If NULL, we create one
138  if (m_optionsObj == NULL) {
139  m_optionsObj.reset(new SipOptionsValues(&m_env, prefix));
140  }
141  else {
142  // If the user passed in a legitimate options object, then copy it into a
143  // ScopedPtr
144  m_optionsObj.reset(new SipOptionsValues(*alternativeOptionsValues));
145  }
146 
147 
148  if (m_optionsObj->m_help != "") {
149  if (m_env.subDisplayFile()) {
150  *m_env.subDisplayFile() << (*m_optionsObj) << std::endl;
151  }
152  }
153 
154  queso_require_equal_to_msg(m_priorRv.imageSet().vectorSpace().dimLocal(), m_likelihoodFunction.domainSet().vectorSpace().dimLocal(), "'priorRv' and 'likelihoodFunction' are related to vector spaces of different dimensions");
155 
156  queso_require_equal_to_msg(m_priorRv.imageSet().vectorSpace().dimLocal(), postRv.imageSet().vectorSpace().dimLocal(), "'priorRv' and 'postRv' are related to vector spaces of different dimensions");
157 
158  if (m_env.subDisplayFile()) {
159  *m_env.subDisplayFile() << "Leaving StatisticalInverseProblem<P_V,P_M>::constructor()"
160  << ": prefix = " << m_optionsObj->m_prefix
161  << std::endl;
162  }
163 
164  return;
165 }
166 
167 // Destructor --------------------------------------
168 template <class P_V,class P_M>
170 {
171 }
172 // Statistical methods -----------------------------
173 template <class P_V,class P_M>
174 void
176  const MhOptionsValues* alternativeOptionsValues, // dakota
177  const P_V& initialValues,
178  const P_M* initialProposalCovMatrix)
179 {
180  //grvy_timer_begin("BayesMetropolisHastings"); TODO: revisit timing output
181  //std::cout << "proc " << m_env.fullRank() << ", HERE sip 000" << std::endl;
182  m_env.fullComm().Barrier();
183  //std::cout << "proc " << m_env.fullRank() << ", HERE sip 001" << std::endl;
184  m_env.fullComm().syncPrintDebugMsg("Entering StatisticalInverseProblem<P_V,P_M>::solveWithBayesMetropolisHastings()",1,3000000);
185 
186  if (m_optionsObj->m_computeSolution == false) {
187  if ((m_env.subDisplayFile())) {
188  *m_env.subDisplayFile() << "In StatisticalInverseProblem<P_V,P_M>::solveWithBayesMetropolisHastings()"
189  << ": avoiding solution, as requested by user"
190  << std::endl;
191  }
192  return;
193  }
194  if ((m_env.subDisplayFile())) {
195  *m_env.subDisplayFile() << "In StatisticalInverseProblem<P_V,P_M>::solveWithBayesMetropolisHastings()"
196  << ": computing solution, as requested by user"
197  << std::endl;
198  }
199 
200  queso_require_equal_to_msg(m_priorRv.imageSet().vectorSpace().dimLocal(), initialValues.sizeLocal(), "'m_priorRv' and 'initialValues' should have equal dimensions");
201 
202  if (initialProposalCovMatrix) {
203  queso_require_equal_to_msg(m_priorRv.imageSet().vectorSpace().dimLocal(), initialProposalCovMatrix->numRowsLocal(), "'m_priorRv' and 'initialProposalCovMatrix' should have equal dimensions");
204  queso_require_equal_to_msg(initialProposalCovMatrix->numCols(), initialProposalCovMatrix->numRowsGlobal(), "'initialProposalCovMatrix' should be a square matrix");
205  }
206 
207  P_V numEvaluationPointsVec(m_priorRv.imageSet().vectorSpace().zeroVector());
208  numEvaluationPointsVec.cwSet(250.);
209 
210  // Compute output pdf up to a multiplicative constant: Bayesian approach
211  m_solutionDomain.reset(InstantiateIntersection(m_priorRv.pdf().domainSet(),m_likelihoodFunction.domainSet()));
212 
213  m_solutionPdf.reset(new BayesianJointPdf<P_V,P_M>(m_optionsObj->m_prefix.c_str(),
214  m_priorRv.pdf(),
215  m_likelihoodFunction,
216  1.,
217  *m_solutionDomain));
218 
219  m_postRv.setPdf(*m_solutionPdf);
220  m_chain.reset(new SequenceOfVectors<P_V,P_M>(m_postRv.imageSet().vectorSpace(),0,m_optionsObj->m_prefix+"chain"));
221 
222  // Decide whether or not to create a MetropolisHastingsSG instance from the
223  // user-provided initial seed, or use the user-provided seed for a
224  // deterministic optimisation instead and seed the chain with the result of
225  // the optimisation
226  if (this->m_seedWithMAPEstimator ||
227  m_optionsObj->m_seedWithMAPEstimator) {
228  // Unfortunately, I didn't have the foresight to make this an input file
229  // option from the beginning, hence needing to check two flags
230 
231  // Read in optimizer options from input file
232  OptimizerOptions optimizer_options(&m_env, "ip_");
233 
234  // Do optimisation before sampling
235  GslOptimizer optimizer(optimizer_options, *m_solutionPdf);
236  optimizer.setInitialPoint(dynamic_cast<const GslVector &>(initialValues));
237 
238  OptimizerMonitor monitor(m_env);
239  monitor.set_display_output(true, true);
240 
241  // If the input file option is set, then use the monitor, otherwise don't
242  if (m_optionsObj->m_useOptimizerMonitor) {
243  optimizer.minimize(&monitor);
244  }
245  else {
246  optimizer.minimize();
247  }
248 
249  // Compute output realizer: Metropolis-Hastings approach
250  m_mhSeqGenerator.reset(new MetropolisHastingsSG<P_V, P_M>(
251  m_optionsObj->m_prefix.c_str(), alternativeOptionsValues,
252  m_postRv, optimizer.minimizer(), initialProposalCovMatrix));
253  }
254  else {
255  // Compute output realizer: Metropolis-Hastings approach
256  m_mhSeqGenerator.reset(new MetropolisHastingsSG<P_V, P_M>(
257  m_optionsObj->m_prefix.c_str(), alternativeOptionsValues, m_postRv,
258  initialValues, initialProposalCovMatrix));
259  }
260 
261 
262  m_logLikelihoodValues.reset(new ScalarSequence<double>(m_env, 0,
263  m_optionsObj->m_prefix +
264  "logLike"));
265 
266  m_logTargetValues.reset(new ScalarSequence<double>(m_env, 0,
267  m_optionsObj->m_prefix +
268  "logTarget"));
269 
270  // m_logLikelihoodValues and m_logTargetValues may be NULL
271  m_mhSeqGenerator->generateSequence(*m_chain, m_logLikelihoodValues.get(),
272  m_logTargetValues.get());
273 
274  m_solutionRealizer.reset(new SequentialVectorRealizer<P_V,P_M>(m_optionsObj->m_prefix.c_str(),
275  *m_chain));
276 
277  m_postRv.setRealizer(*m_solutionRealizer);
278 
279  m_env.fullComm().syncPrintDebugMsg("In StatisticalInverseProblem<P_V,P_M>::solveWithBayesMetropolisHastings(), code place 1",3,3000000);
280  //m_env.fullComm().Barrier();
281 
282  // Compute output mdf: uniform sampling approach
283 #ifdef UQ_ALSO_COMPUTE_MDFS_WITHOUT_KDE
284  m_subMdfGrids.reset(new ArrayOfOneDGrids <P_V,P_M>((m_optionsObj->m_prefix+"Mdf_").c_str(),m_postRv.imageSet().vectorSpace()));
285  m_subMdfValues.reset(new ArrayOfOneDTables<P_V,P_M>((m_optionsObj->m_prefix+"Mdf_").c_str(),m_postRv.imageSet().vectorSpace()));
286  m_chain->subUniformlySampledMdf(numEvaluationPointsVec, // input
287  *m_subMdfGrids, // output
288  *m_subMdfValues); // output
289  m_subSolutionMdf.reset(new SampledVectorMdf<P_V,P_M>(m_optionsObj->m_prefix.c_str(),
290  *m_subMdfGrids,
291  *m_subMdfValues));
292  m_postRv.setMdf(*m_subSolutionMdf);
293 
294  if ((m_optionsObj->m_dataOutputFileName != UQ_SIP_FILENAME_FOR_NO_FILE ) &&
295  (m_optionsObj->m_dataOutputAllowedSet.find(m_env.subId()) != m_optionsObj->m_dataOutputAllowedSet.end())) {
296  if (m_env.subRank() == 0) {
297  // Write data output file
298  if (m_env.subDisplayFile()) {
299  *m_env.subDisplayFile() << "Opening data output file '" << m_optionsObj->m_dataOutputFileName
300  << "' for calibration problem with problem with prefix = " << m_optionsObj->m_prefix
301  << std::endl;
302  }
303 
304  // Open file
305  // Always write at the end of an eventual pre-existing file
306  std::ofstream* ofsvar = new std::ofstream((m_optionsObj->m_dataOutputFileName+"_sub"+m_env.subIdString()+".m").c_str(), std::ofstream::out | std::ofstream::in | std::ofstream::ate);
307  if ((ofsvar == NULL ) ||
308  (ofsvar->is_open() == false)) {
309  delete ofsvar;
310  ofsvar = new std::ofstream((m_optionsObj->m_dataOutputFileName+"_sub"+m_env.subIdString()+".m").c_str(), std::ofstream::out | std::ofstream::trunc);
311  }
312  queso_require_msg((ofsvar && ofsvar->is_open()), "failed to open file");
313 
314  m_postRv.mdf().print(*ofsvar);
315 
316  // Close file
317  //ofsvar->close();
318  delete ofsvar;
319  if (m_env.subDisplayFile()) {
320  *m_env.subDisplayFile() << "Closed data output file '" << m_optionsObj->m_dataOutputFileName
321  << "' for calibration problem with problem with prefix = " << m_optionsObj->m_prefix
322  << std::endl;
323  }
324  }
325  }
326 #endif
327  if (m_env.subDisplayFile()) {
328  *m_env.subDisplayFile() << std::endl;
329  }
330 
331  m_env.fullComm().syncPrintDebugMsg("Leaving StatisticalInverseProblem<P_V,P_M>::solveWithBayesMetropolisHastings()",1,3000000);
332  m_env.fullComm().Barrier();
333  // grvy_timer_end("BayesMetropolisHastings"); TODO: revisit timers
334 }
335 
336 template <class P_V, class P_M>
337 void
339  const MhOptionsValues * alternativeOptionsValues,
340  const P_V & initialValues)
341 {
342  P_M proposalCovMatrix(m_priorRv.imageSet().vectorSpace().zeroVector());
343 
344  m_priorRv.pdf().distributionVariance(proposalCovMatrix);
345 
346  this->solveWithBayesMetropolisHastings(alternativeOptionsValues,
347  initialValues,
348  &proposalCovMatrix);
349 }
350 
351 template <class P_V, class P_M>
352 void
354  const MhOptionsValues * alternativeOptionsValues)
355 {
356  P_V initialValues(m_priorRv.imageSet().vectorSpace().zeroVector());
357 
358  m_priorRv.pdf().distributionMean(initialValues);
359 
360  this->solveWithBayesMetropolisHastings(alternativeOptionsValues,
361  initialValues);
362 }
363 
364 template <class P_V, class P_M>
365 void
367 {
368  this->solveWithBayesMetropolisHastings(NULL);
369 }
370 
371 template <class P_V, class P_M>
372 void
374 {
375  this->m_seedWithMAPEstimator = true;
376 }
377 
378 template <class P_V,class P_M>
379 void
381 {
382  m_env.fullComm().Barrier();
383  m_env.fullComm().syncPrintDebugMsg("Entering StatisticalInverseProblem<P_V,P_M>::solveWithBayesMLSampling()",1,3000000);
384 
385  if (m_optionsObj->m_computeSolution == false) {
386  if ((m_env.subDisplayFile())) {
387  *m_env.subDisplayFile() << "In StatisticalInverseProblem<P_V,P_M>::solveWithBayesMLSampling()"
388  << ": avoiding solution, as requested by user"
389  << std::endl;
390  }
391  return;
392  }
393  if ((m_env.subDisplayFile())) {
394  *m_env.subDisplayFile() << "In StatisticalInverseProblem<P_V,P_M>::solveWithBayesMLSampling()"
395  << ": computing solution, as requested by user"
396  << std::endl;
397  }
398 
399  P_V numEvaluationPointsVec(m_priorRv.imageSet().vectorSpace().zeroVector());
400  numEvaluationPointsVec.cwSet(250.);
401 
402  // Compute output pdf up to a multiplicative constant: Bayesian approach
403  m_solutionDomain.reset(InstantiateIntersection(m_priorRv.pdf().domainSet(),m_likelihoodFunction.domainSet()));
404 
405  m_solutionPdf.reset(new BayesianJointPdf<P_V,P_M>(m_optionsObj->m_prefix.c_str(),
406  m_priorRv.pdf(),
407  m_likelihoodFunction,
408  1.,
409  *m_solutionDomain));
410 
411  m_postRv.setPdf(*m_solutionPdf);
412 
413  // Compute output realizer: ML approach
414  m_chain.reset(new SequenceOfVectors<P_V,P_M>(m_postRv.imageSet().vectorSpace(),0,m_optionsObj->m_prefix+"chain"));
415  m_mlSampler.reset(new MLSampling<P_V,P_M>(m_optionsObj->m_prefix.c_str(),
416  //m_postRv,
417  m_priorRv,
418  m_likelihoodFunction));
419  // initialValues,
420  // initialProposalCovMatrix);
421 
422  m_mlSampler->generateSequence(*m_chain,
423  NULL,
424  NULL);
425 
426  m_solutionRealizer.reset(new SequentialVectorRealizer<P_V,P_M>(m_optionsObj->m_prefix.c_str(),
427  *m_chain));
428 
429  m_postRv.setRealizer(*m_solutionRealizer);
430 
431  if (m_env.subDisplayFile()) {
432  *m_env.subDisplayFile() << std::endl;
433  }
434 
435  m_env.fullComm().syncPrintDebugMsg("Leaving StatisticalInverseProblem<P_V,P_M>::solveWithBayesMLSampling()",1,3000000);
436  m_env.fullComm().Barrier();
437 
438  return;
439 }
440 
441 template <class P_V, class P_M>
444 {
445  return *m_mhSeqGenerator;
446 }
447 
448 //--------------------------------------------------
449 template <class P_V,class P_M>
452 {
453  return m_priorRv;
454 }
455 //--------------------------------------------------
456 template <class P_V,class P_M>
459 {
460  return m_postRv;
461 }
462 //--------------------------------------------------
463 template <class P_V,class P_M>
466 {
467  queso_require_msg(m_chain, "m_chain is NULL");
468  return *m_chain;
469 }
470 //--------------------------------------------------
471 template <class P_V,class P_M>
474 {
475  queso_require_msg(m_logLikelihoodValues, "m_logLikelihoodValues is NULL");
476  return *m_logLikelihoodValues;
477 }
478 //--------------------------------------------------
479 template <class P_V,class P_M>
482 {
483  queso_require_msg(m_logTargetValues, "m_logTargetValues is NULL");
484  return *m_logTargetValues;
485 }
486 //--------------------------------------------------
487 template <class P_V,class P_M>
489 {
490  queso_require_msg(m_mlSampler, "m_mlSampler is NULL");
491  return m_mlSampler->logEvidence();
492 }
493 //--------------------------------------------------
494 template <class P_V,class P_M>
496 {
497  queso_require_msg(m_mlSampler, "m_mlSampler is NULL");
498  return m_mlSampler->meanLogLikelihood();
499 }
500 //--------------------------------------------------
501 template <class P_V,class P_M>
503 {
504  queso_require_msg(m_mlSampler, "m_mlSampler is NULL");
505  return m_mlSampler->eig();
506 }
507 // I/O methods--------------------------------------
508 template <class P_V,class P_M>
509 void
511 {
512  return;
513 }
514 
515 } // End namespace QUESO
516 
void set_display_output(bool enable_output, bool print_xmin)
Enabling output to std::cout everytime append is called.
Class to accommodate arrays of one-dimensional grid.
const GslVector & minimizer() const
Return the point that minimizes the objective function.
Definition: GslOptimizer.C:251
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.
virtual void minimize(OptimizerMonitor *monitor=NULL)
Minimize the objective function, starting at m_initialPoint.
Definition: GslOptimizer.C:207
double logEvidence() const
Returns the logarithm value of the evidence. Related to ML.
const ScalarSequence< double > & logLikelihoodValues() const
Returns log likelihood values; access to private attribute m_logLikelihoodValues. ...
const BaseVectorRV< P_V, P_M > & m_priorRv
Class to accommodate arrays of one-dimensional tables.
ScopedPtr< const SipOptionsValues >::Type m_optionsObj
const BaseVectorRV< P_V, P_M > & priorRv() const
Returns the Prior RV; access to private attribute m_priorRv.
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:83
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:354
This class provides options for a Statistical Inverse Problem if no input file is available...
virtual const VectorSpace< V, M > & vectorSpace() const =0
Vector space to which this set belongs to. See template specialization.
void print(std::ostream &os) const
TODO: Prints the sequence.
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
const BaseVectorSequence< P_V, P_M > & chain() const
Returns the MCMC chain; access to private attribute m_chain.
const VectorSet< V, M > & domainSet() const
Access to the protected attribute m_domainSet: domain set of the scalar function. ...
A templated class that represents a Metropolis-Hastings generator of samples.
void setInitialPoint(const GslVector &intialPoint)
Set the point at which the optimization starts.
Definition: GslOptimizer.C:243
Class for handling vector samples (sequence of vectors).
const GenericVectorRV< P_V, P_M > & postRv() const
Returns the Posterior RV; access to private attribute m_postrRv.
void solveWithBayesMLSampling()
Solves with Bayes Multi-Level (ML) sampling.
double meanLogLikelihood() const
Returns the mean of the logarithm value of the likelihood. Related to ML.
Base class for handling vector and array samples (sequence of vectors or arrays). ...
const ScalarSequence< double > & logTargetValues() const
Returns log target values; access to private attribute m_logTargetValues.
const BaseScalarFunction< P_V, P_M > & m_likelihoodFunction
const MetropolisHastingsSG< P_V, P_M > & sequenceGenerator() const
Return the underlying MetropolisHastingSG object.
This class provides options for a Optimizer.
unsigned int dimLocal() const
Definition: VectorSpace.C:155
This templated class represents a Statistical Inverse Problem.
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
void seedWithMAPEstimator()
Seeds the chain with the result of a deterministic optimisation.
Object to monitor convergence of optimizers.
A templated class that represents a Multilevel generator of samples.
Definition: MLSampling.h:122
A class for handling sampled vector MDFs.
A class for handling Bayesian joint PDFs.
A class for handling sequential draws (sampling) from probability density distributions.
VectorSet< V, M > * InstantiateIntersection(const VectorSet< V, M > &domain1, const VectorSet< V, M > &domain2)
This method calculates the intersection of domain1 and domain2.
A base class for handling optimisation of scalar functions.
Definition: GslOptimizer.h:50
void solveWithBayesMetropolisHastings()
Solves the problem via Bayes formula and a Metropolis-Hastings algorithm.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320

Generated on Tue Jun 5 2018 19:48:56 for queso-0.57.1 by  doxygen 1.8.5