mcmc.yaml
# Configuration files that customize the default behaviour of non-linear searches.
# **PyAutoFit** supports the following MCMC algorithms:
# - Emcee: https://github.com/dfm/emcee / https://emcee.readthedocs.io/en/stable/
# - Zeus: https://github.com/minaskar/zeus / https://zeus-mcmc.readthedocs.io/en/latest/
# Settings in the [search] and [run] entries are specific to each nested algorithm and should be determined by
# consulting that MCMC method's own readthedocs.
Emcee:
run:
nsteps: 2000
search:
nwalkers: 50
auto_correlations:
change_threshold: 0.01 # The threshold value by which if the change in auto_correlations is below sampling will be terminated early.
check_for_convergence: true # Whether the auto-correlation lengths of the Emcee samples are checked to determine the stopping criteria. If `True`, Emcee may stop before nsteps are performed.
check_size: 100 # The length of the samples used to check the auto-correlation lengths (from the latest sample backwards).
required_length: 50 # The length an auto_correlation chain must be for it to be used to evaluate whether its change threshold is sufficiently small to terminate sampling early.
initialize: # The method used to generate where walkers are initialized in parameter space {prior | ball}.
method: ball # priors: samples are initialized by randomly drawing from each parameter's prior. ball: samples are initialized by randomly drawing unit values from a narrow uniform distribution.
ball_lower_limit: 0.49 # The lower limit of the uniform distribution unit values are drawn from when initializing walkers using the ball method.
ball_upper_limit: 0.51 # The upper limit of the uniform distribution unit values are drawn from when initializing walkers using the ball method.
parallel:
number_of_cores: 1 # The number of cores the search is parallelized over by default, using Python multiprocessing.
printing:
silence: false # If True, the default print output of the non-linear search is silcened and not printed by the Python interpreter.
prior_passer:
sigma: 3.0 # For non-linear search chaining and model prior passing, the sigma value of the inferred model parameter used as the sigma of the passed Gaussian prior.
use_errors: true # If True, the errors of the previous model's results are used when passing priors.
use_widths: true # If True the width of the model parameters defined in the priors config file are used.
updates:
iterations_per_update: 500 # The number of iterations of the non-linear search performed between every 'update', where an update performs tasks like outputting model.results.
remove_state_files_at_end: true # Whether to remove the savestate of the seach (e.g. the Emcee hdf5 file) at the end to save hard-disk space (results are still stored as PyAutoFit pickles and loadable).
Zeus:
run:
check_walkers: true
light_mode: false
maxiter: 10000
maxsteps: 10000
mu: 1.0
nsteps: 2000
patience: 5
shuffle_ensemble: true
tolerance: 0.05
tune: true
vectorize: false
search:
nwalkers: 50
auto_correlations:
change_threshold: 0.01 # The threshold value by which if the change in auto_correlations is below sampling will be terminated early.
check_for_convergence: true # Whether the auto-correlation lengths of the Emcee samples are checked to determine the stopping criteria. If `True`, Emcee may stop before nsteps are performed.
check_size: 100 # The length of the samples used to check the auto-correlation lengths (from the latest sample backwards).
required_length: 50 # The length an auto_correlation chain must be for it to be used to evaluate whether its change threshold is sufficiently small to terminate sampling early.
initialize: # The method used to generate where walkers are initialized in parameter space {prior | ball}.
method: ball # priors: samples are initialized by randomly drawing from each parameter's prior. ball: samples are initialized by randomly drawing unit values from a narrow uniform distribution.
ball_lower_limit: 0.49 # The lower limit of the uniform distribution unit values are drawn from when initializing walkers using the ball method.
ball_upper_limit: 0.51 # The upper limit of the uniform distribution unit values are drawn from when initializing walkers using the ball method.
parallel:
number_of_cores: 1 # The number of cores the search is parallelized over by default, using Python multiprocessing.
printing:
silence: false # If True, the default print output of the non-linear search is silenced and not printed by the Python interpreter.
prior_passer:
sigma: 3.0 # For non-linear search chaining and model prior passing, the sigma value of the inferred model parameter used as the sigma of the passed Gaussian prior.
use_errors: true # If True, the errors of the previous model's results are used when passing priors.
use_widths: true # If True the width of the model parameters defined in the priors config file are used.
updates:
iterations_per_update: 500 # The number of iterations of the non-linear search performed between every 'update', where an update performs tasks like outputting model.results.
remove_state_files_at_end: true # Whether to remove the savestate of the seach (e.g. the Emcee hdf5 file) at the end to save hard-disk space (results are still stored as PyAutoFit pickles and loadable).