emcee: AutocorrError, 'The chain is too short to reliably estimate the autocorrelation time'
I’ve been using emcee without any problems for a while. Recently I tried running my program in Windows10, but I get an error with the autocorr (that I didn’t get before). Using the quickstart.py example I get the same problem but I can’t figure out whats wrong whatsoever. I hope you can help me figuring out whats wrong . This is the log I get running quickstart.py :
In [1]: run quickstart.py
Mean acceptance fraction: 0.191032
---------------------------------------------------------------------------
AutocorrError Traceback (most recent call last)
C:\Users\anibal\Documents\GitHub\emcee\examples\quickstart.py in <module>()
58 # Estimate the integrated autocorrelation time for the time series in each
59 # parameter.
---> 60 print("Autocorrelation time:", sampler.get_autocorr_time())
61
62 # Finally, you can plot the projected histograms of the samples using
C:\Users\anibal\Anaconda2\lib\site-packages\emcee-2.2.1-py2.7.egg\emcee\ensemble.pyc in get_autocorr_time(self, low, high, step, c, fast)
501 return autocorr.integrated_time(np.mean(self.chain, axis=0), axis=0,
502 low=low, high=high, step=step, c=c,
--> 503 fast=fast)
504
505
C:\Users\anibal\Anaconda2\lib\site-packages\emcee-2.2.1-py2.7.egg\emcee\autocorr.pyc in integrated_time(x, low, high, step, c, full_output, axis, fast)
116 break
117
--> 118 raise AutocorrError("The chain is too short to reliably estimate "
119 "the autocorrelation time")
120
AutocorrError: The chain is too short to reliably estimate the autocorrelation time
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 15 (5 by maintainers)
Commits related to this issue
- fixing #195 — committed to dfm/emcee by dfm 8 years ago
The most recent version of emcee has a more robust autocorrelation time estimator so I reduced the dimensionality of the quickstart example and ran more steps of MCMC. This error won’t be thrown for the example now and, if you’re finding it with your own code, that means that your chains probably haven’t converged! If you must, you can reduce the
cparameter to a smaller value but the estimate won’t be as reliable so be careful.