Hamiltonian MCMC Sampler¶
-
class
sampyl.
Hamiltonian
(logp, start, step_size=1, n_steps=5, **kwargs)¶ -
sample
(num, burn=0, thin=1, n_chains=1, progress_bar=True)¶ Sample from \(P(X)\)
Parameters: - num – int. Number of samples to draw from \(P(X)\).
- burn – (optional) int. Number of samples to discard from the beginning of the chain.
- thin – (optional) float. Thin the samples by this factor.
- n_chains – (optional) int. Number of chains to return. Each chain is given its own process and the OS decides how to distribute the processes.
- progress_bar – (optional) boolean. Show the progress bar, default = True.
Returns: Record array with fields taken from arguments of logp function.
-