autofit.AutoCorrelationsSettings#

class autofit.AutoCorrelationsSettings(check_for_convergence: Optional[bool] = None, check_size: Optional[int] = None, required_length: Optional[int] = None, change_threshold: Optional[float] = None)[source]#

Bases: object

Class for performing and customizing AutoCorrelation calculations, which are used:

  • By the Samples object during a model-fit to determine is an ensemble MCMC sampler should terminate.

  • After a model-fit is finished to investigate whether the resutls converged.

Parameters:
  • check_for_convergence – Whether the auto-correlation lengths of the Emcee samples are checked to determine the stopping criteria. If True, this option may terminate the Emcee run before the input number of steps, nsteps, has been performed. If False nstep samples will be taken.

  • check_size – The length of the samples used to check the auto-correlation lengths (from the latest sample backwards). For convergence, the auto-correlations must not change over a certain range of samples. A longer check-size thus requires more samples meet the auto-correlation threshold, taking longer to terminate sampling. However, shorter chains risk stopping sampling early due to noise.

  • required_length – 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.

  • change_threshold – The threshold value by which if the change in auto_correlations is below sampling will be terminated early.

Methods

update_via_config