Hamiltonian Monte Carlo (HMC) sampler
creates
a Hamiltonian Monte Carlo (HMC) sampler, returned as a hmc
= hmcSampler(logpdf
,startpoint
)HamiltonianSampler
object. logpdf
is
a function handle that evaluates the logarithm of the probability
density of the equilibrium distribution and its gradient. The column
vector startpoint
is the initial point from which
to start HMC sampling.
After you create the sampler, you can compute MAP (maximum-a-posteriori)
point estimates, tune the sampler, draw samples, and check convergence
diagnostics using the methods of the HamiltonianSampler
class. For an example of this workflow,
see Bayesian Linear Regression
Using Hamiltonian Monte Carlo.
specifies
additional options using one or more name-value pair arguments. Specify
name-value pair arguments after all other input arguments.hmc
= hmcSampler(___,Name,Value
)