]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Adjust the proposal distribution to get a particular acceptance ratio.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 16 Jan 2020 21:23:30 +0000 (14:23 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 16 Jan 2020 22:03:17 +0000 (15:03 -0700)
MCMC-Laplace/mcmc-laplace.cc

index 5a6633f4f89ba0efb8e8446e90809e78170a2c95..80e86567c2130ad013c32b27a06ecc07d25e5472 100644 (file)
@@ -842,7 +842,7 @@ int main()
   LogLikelihood::Gaussian        log_likelihood(exact_solution, 0.05);
   LogPrior::LogGaussian          log_prior(0, 2);
   ProposalGenerator::LogGaussian proposal_generator(
-    random_seed, 0.0725); /* so that the acceptance ratio is ~0.3 */
+    random_seed, 0.09); /* so that the acceptance ratio is ~0.24 */
   Sampler::MetropolisHastings sampler(laplace_problem,
                                       log_likelihood,
                                       log_prior,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.