hierarc.Sampling package

Subpackages

Submodules

hierarc.Sampling.mcmc_sampling module

class hierarc.Sampling.mcmc_sampling.MCMCSampler(*args, **kwargs)[source]

Bases: object

Class which executes the different sampling methods.

mcmc_emcee(n_walkers, n_burn, n_run, kwargs_mean_start, kwargs_sigma_start, continue_from_backend=False, **kwargs_emcee)[source]

Runs the EMCEE MCMC sampling.

Parameters:
  • n_walkers – number of walkers

  • n_burn – number of iteration of burn in (not stored in the output sample

  • n_run – number of iterations (after burn in) to be sampled

  • kwargs_mean_start – keyword arguments of the mean starting position

  • kwargs_sigma_start – keyword arguments of the spread in the initial particles per parameter

  • continue_from_backend – bool, if True and ‘backend’ in kwargs_emcee, will continue a chain sampling from backend

  • kwargs_emcee – keyword argument for the emcee (e.g. to specify backend)

Returns:

samples of the EMCEE run

param_names(latex_style=False)[source]

List of parameter names being sampled in the same order as the sampling.

Parameters:

latex_style – bool, if True returns strings in latex symbols, else in the convention of the sampler

Returns:

list of strings

Module contents