esem.abc_sampler.ABCSampler.batch_constrain¶
- ABCSampler.batch_constrain(sample_points, tolerance=0.0, threshold=3.0, batch_size=1)¶
Constrain the supplied sample points based on the tolerance threshold, optionally in bathes.
Return a boolean array indicating if each sample meets the implausibility criteria:
I < T
Return True (for a sample) if the number of implausibility measures greater than the threshold is less than or equal to the tolerance
- Parameters
sample_points (
ndarray
) – An array of sample points which are to be emulated and compared with the observationstolerance (
float
) – The fraction of samples which are allowed to be over the thresholdthreshold (
float
) – The number of standard deviations a sample is allowed to be away from the obsbatch_size (
int
) – The size of the batches in which to perform the constraining (useful for large samples)
- Returns
ndarray
– A boolean array which is true where the (emulated) samples are compatible with the observations and false otherwise