HMC Step
hmc_step(log_posterior, gradient, step_size, n_steps, position, d)
| log_posterior | a function for the unnormalised log-posterior from parameters -> log-likelihood |
|---|---|
| gradient | the gradient of the log_posterior |
| step_size | the step size of the leapfrog steps |
| n_steps | the number of leapfrog steps |
| position | the current value of the parameter vector |
| d | the dimension of the parameter vector |