standard_static
jaxns.nested_sampler.standard_static
Module Contents
- class TerminationCondition[source]
Bases:
NamedTuple
Contains the termination conditions for the nested sampling run.
- Parameters:
ess – The effective sample size, if the ESS (Kish’s estimate) is greater than this the run will terminate.
evidence_uncert – The uncertainty in the evidence, if the uncertainty is less than this the run will terminate.
live_evidence_frac – Depreceated use dlogZ.
dlogZ – Terminate if log(Z_current + Z_remaining) - log(Z_current) < dlogZ. Default log(1 + 1e-2)
max_samples – Terminate if the number of samples exceeds this.
max_num_likelihood_evaluations – Terminate if the number of likelihood evaluations exceeds this.
log_L_contour – Terminate if this log(L) contour is reached. A contour is reached if any dead point has log(L) > log_L_contour. Uncollected live points are not considered.
efficiency_threshold – Terminate if the efficiency (num_samples / num_likelihood_evaluations) is less than this, for the last shrinkage iteration.
- class StandardStaticNestedSampler(init_efficiency_threshold, sampler, num_live_points, model, max_samples, num_parallel_workers=1, verbose=False)[source]
Bases:
jaxns.nested_sampler.bases.BaseAbstractNestedSampler
A static nested sampler that uses a fixed number of live points. This uses a uniform sampler to generate the initial set of samples down to an efficiency threshold, then uses a provided sampler to generate the rest of the samples until the termination condition is met.
Initialise the static nested sampler.
- Parameters:
init_efficiency_threshold (float) – the efficiency threshold to use for the initial uniform sampling. If 0 then turns it off.
sampler (jaxns.samplers.bases.BaseAbstractSampler) – the sampler to use after the initial uniform sampling.
num_live_points (int) – the number of live points to use.
model (jaxns.framework.bases.BaseAbstractModel) – the model to use.
max_samples (int) – the maximum number of samples to take.
num_parallel_workers (int) – number of parallel workers to use. Defaults to 1. Experimental feature.
verbose (bool) – whether to log as we go.