Perform n_steps Leapfrog steps

hmc_leapfrogs(gradient, step_size, n_steps, position, momentum, d)

Arguments

gradient

the gradient of the target

step_size

the step size of the leapfrog step

n_steps

the total number of steps

position

the current value of the parameter vector, termed position in Hamiltonian dynamics

momentum

the current "momentum" in the HMC sampler

d

dimension of parmaeter vector

Value