termination
jaxns.nested_samplers.common.termination
Module Contents
- determine_termination(term_cond, termination_register)[source]
- Determine if termination should happen. Termination Flags are bits:
0-bit -> 1: used maximum allowed number of samples 1-bit -> 2: evidence uncert below threshold 2-bit -> 4: live points evidence below threshold 3-bit -> 8: effective sample size big enough 4-bit -> 16: used maxmimum allowed number of likelihood evaluations 5-bit -> 32: maximum log-likelihood contour reached 6-bit -> 64: sampler efficiency too low 7-bit -> 128: entire live-points set is a single plateau 8-bit -> 256: relative spread of live points < rtol 9-bit -> 512: absolute spread of live points < atol 10-bit -> 1024: no seed points left 11-bit -> 2048: XL < max(XL) * peak_XL_frac
Multiple flags are summed together
- Parameters:
term_cond (Union[jaxns.nested_samplers.common.types.TerminationConditionDisjunction, jaxns.nested_samplers.common.types.TerminationConditionConjunction, jaxns.nested_samplers.common.types.TerminationCondition]) – termination condition
termination_register (jaxns.nested_samplers.common.types.TerminationRegister) – register of termination variables to check against termination condition
- Returns:
boolean done signal, and termination reason
- Return type:
Tuple[jaxns.internals.types.BoolArray, jaxns.internals.types.IntArray]