metropolis - MCMC step acceptance test¶
metropolis |
Metropolis rule for acceptance or rejection |
metropolis_dr |
Delayed rejection metropolis |
MCMC step acceptance test.
-
bumps.dream.metropolis.
metropolis
(xtry, logp_try, xold, logp_old, step_alpha)[source]¶ Metropolis rule for acceptance or rejection
Generates the next generation, newgen from:
x_new[k] = x[k] if U > alpha = x_old[k] if U <= alpha
where alpha is p/p_old and accept is U > alpha.
Returns x_new, logp_new, alpha, accept