threeML.bayesian.ultranest_sampler module

class threeML.bayesian.ultranest_sampler.UltraNestSampler(likelihood_model=None, data_list=None, **kwargs)[source]

Bases: UnitCubeSampler

sample(quiet=False)[source]

sample using the UltraNest numerical integration method :rtype:

Returns:

setup(min_num_live_points: int = 400, dlogz: float = 0.5, chain_name: str | None = None, resume: str = 'overwrite', wrapped_params=None, stepsampler=None, use_mlfriends: bool = True, **kwargs)[source]

set up the Ultranest sampler. Consult the documentation: https://johannesbuchner.github.io/UltraNest/ultranest.html?highlight=reactive#ultranest.integrator.ReactiveNestedSampler

Parameters:
  • min_num_live_points (int) – minimum number of live points throughout the run

  • dlogz (float) – Target evidence uncertainty. This is the std between bootstrapped logz integrators.

  • chain_name – where to store output files

  • resume – (‘resume’, ‘resume-similar’, ‘overwrite’ or ‘subfolder’) –

if ‘overwrite’, overwrite previous data. if ‘subfolder’, create a fresh subdirectory in log_dir. if ‘resume’ or True, continue previous run if available. Only works when dimensionality, transform or likelihood are consistent. if ‘resume-similar’, continue previous run if available. Only works when dimensionality and transform are consistent. If a likelihood difference is detected, the existing likelihoods are updated until the live point order differs. Otherwise, behaves like resume. :type resume: str :param wrapped_params: (list of bools) – indicating whether this parameter wraps around (circular parameter). :type wrapped_params: :param stepsampler: :type stepsampler: :param use_mlfriends: Whether to use MLFriends+ellipsoidal+tellipsoidal region (better for multi-modal problems) or just ellipsoidal sampling (faster for high-dimensional, gaussian-like problems). :type use_mlfriends: bool :returns: