metropolis - MCMC step acceptance test¶
Metropolis rule for acceptance or rejection |
|
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