HMC(model, M=None, stepsize=0.1)¶
An implementation of Hybrid Monte Carlo (HMC) for GPy models
Initialize an object for HMC sampling. Note that the status of the model (model parameters) will be changed during sampling.
- model (GPy.core.Model) – the GPy model that will be sampled
- M (numpy.ndarray) – the mass matrix (an identity matrix by default)
- stepsize (float) – the step size for HMC sampling
Sample the (unfixed) model parameters.
- num_samples (int) – the number of samples to draw (1000 by default)
- hmc_iters (int) – the number of leap-frog iterations (20 by default)
the list of parameters samples with the size N x P (N - the number of samples, P - the number of parameters to sample)
Metropolis Hastings, with tunings according to Gelman et al.
Make a prediction for the function, to which we will pass the additional arguments
sample(Ntotal=10000, Nburn=1000, Nthin=10, tune=True, tune_throughout=False, tune_interval=400)¶