esem.sampler.MCMCSampler.sample

MCMCSampler.sample(prior_x=None, n_samples=1, kernel_kwargs=None, mcmc_kwargs=None)

This is the call that does the actual inference.

It should call model.sample over the prior, compare with the objective, and then output a posterior distribution

Parameters
  • prior_x (tensorflow_probability.distribution) – The distribution to sample parameters from. By default it will uniformly sample the unit N-D hypercube

  • n_samples (int) – The number of samples to draw

  • kernel_kwargs (dict) – kwargs for the MCMC kernel

  • mcmc_kwargs (dict) – kwargs for the MCMC sampler

Returns

np.array – Array of samples