hierarc.Sampling package¶
Subpackages¶
- hierarc.Sampling.ParamManager package
Submodules¶
hierarc.Sampling.mcmc_sampling module¶
- class hierarc.Sampling.mcmc_sampling.MCMCSampler(*args, **kwargs)[source]¶
Bases:
object
Class which executes the different sampling methods.
- get_emcee_sampler(n_walkers, n_burn, n_run, kwargs_mean_start, kwargs_sigma_start, continue_from_backend=False, **kwargs_emcee)[source]¶
Runs the EMCEE MCMC sampling and returns the sampler.
- 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:
sampler of the EMCEE run
- 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 and returns the flat chain.
- 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