From: Wolfgang Bangerth Date: Thu, 16 Jan 2020 21:23:30 +0000 (-0700) Subject: Adjust the proposal distribution to get a particular acceptance ratio. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ec93c73dd890dba4dd71127ef3e4ff0c3ae588a;p=code-gallery.git Adjust the proposal distribution to get a particular acceptance ratio. --- diff --git a/MCMC-Laplace/mcmc-laplace.cc b/MCMC-Laplace/mcmc-laplace.cc index 5a6633f..80e8656 100644 --- a/MCMC-Laplace/mcmc-laplace.cc +++ b/MCMC-Laplace/mcmc-laplace.cc @@ -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,