esem.abc_sampler.ABCSampler.sample

ABCSampler.sample(prior_x=None, n_samples=1, tolerance=0.0, threshold=3.0)

Sample the emulator over prior_x and compare with the observations, returning n_samples of the posterior distribution (those points for which the model is compatible with the observations).

Parameters
  • prior_x (tensorflow_probability.distribution or None) – 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

  • tolerance (float) – The fraction of samples which are allowed to be over the threshold

  • threshold (float) – The number of standard deviations a sample is allowed to be away from the obs

Returns

ndarray[n_samples] – Array of samples conforming to the specified tolerance and threshold