florianhartig / BayesianTools

General-Purpose MCMC and SMC Samplers and Tools for Bayesian Statistics
https://cran.r-project.org/web/packages/BayesianTools/index.html
119 stars 29 forks source link

DEzs eps parameter does not appear to be used #223

Open twest820 opened 3 years ago

twest820 commented 3 years ago

The settings for DEzs include the parameters eps, eps.mult, and eps.add. eps.mult is used in calculating gamma_par and eps.add is used in finding x_prop. However, searching the code for references to settings$eps finds no hits and numerical runs with different values of eps show no obvious effect.

To speculate, a possible explanation might be eps was copied from DE-MCMC code, superseded by eps.mult and eps.add, but not removed from the DEzs implementation.

It may also be helpful to clarify the descriptions of these parameters. As I currently understand the code,

  1. In DE-MCMC, eps is from ter Braak 2005 equation 2.
  2. In DEzs, eps.sum is from ter Braak and Vrugt 2009 equation 1. Since this equation is identical to ter Braak equation 2, eps.sum and eps are the same thing. It's minor, but probably therefore preferable to call them the same in BayesianTools' DE and DEzs APIs.
  3. Skimming through ter Braak and Vrugt 2009, I'm not seeing a mention of varying γ with eps.mult. Using a variable γ strikes me as logical diversification in an MCMC search but I'm unsure if this is an innovation specific to BayesianTools or if the DEzs documentation could have a second citation.

Personally, I'd probably remove eps.sum, have DEzs use its eps parameter, and rename eps.mult to something like gamma.mult for clarity. Those are breaking changes, though.

florianhartig commented 3 years ago

Thanks, good points ... as for all code, there is a lot of history and this was I think taken over from R code of a DEzs re-implementation by Francesco Minunno. @ForModLabUHel - any comments on the choice of the parameter names and the origin / reference for eps.mult?

In principle, I would be willing to re-name this, my guess is that these parameters are rarely changed by users.

twest820 commented 3 years ago

You're welcome, Florian. Good to know this was helpful.