mrc-ide / drjacoby

Flexible Markov chain monte carlo via reparameterization
https://mrc-ide.github.io/drjacoby/
Other
12 stars 6 forks source link

Add in acceptance rate parameter #99

Closed pwinskill closed 2 years ago

pwinskill commented 2 years ago

Removing hard-coded Robbins-Munro acceptance rate of 0.234 and replacing with run_mcmc() argument with default value of 0.44.

The change follows the optimal acceptance rate for unvariate proposals defined by Roberts and Rosenthal and further discussed by Garthwaite and Sisson.

Have also added a check that the new parameter must be between [0.1]

codecov[bot] commented 2 years ago

Codecov Report

Merging #99 (f985351) into develop (d741879) will increase coverage by 0.16%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #99      +/-   ##
===========================================
+ Coverage    91.80%   91.97%   +0.16%     
===========================================
  Files           14       14              
  Lines         1342     1345       +3     
===========================================
+ Hits          1232     1237       +5     
+ Misses         110      108       -2     
Impacted Files Coverage Δ
src/System.h 100.00% <ø> (ø)
R/main.R 96.35% <100.00%> (+0.02%) :arrow_up:
src/Particle.h 100.00% <100.00%> (ø)
src/System.cpp 100.00% <100.00%> (ø)
src/misc.cpp 28.08% <0.00%> (+2.24%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d741879...f985351. Read the comment docs.