<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Understanding the MCMC chains.
gully
February 2016
In this Notebook we pretty much just look at the Autocorrelation function, and try some experiments, most of which fizzled out.
See the other notebooks for more conclusive work.
Step1:  So the acceptance fraction is about 84%, which seems too high.  It should be closer to 23%.  So we should increase the typical step size.
emcee
<ASSISTANT_TASK:>
Python Code:
import h5py
f = h5py.File('../data/mc.hdf5', mode='r')
list(f.keys())
d = f['samples']
list(d.attrs)
d.attrs['acceptance']
Explanation: Understanding the MCMC chains.
gully
February 2016
In this Notebook we pretty much just look at the Autocorrelation function, and try some experiments, most of which fizzled out.
See the other notebooks for more conclusive work.
End of explanation
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
%config InlineBackend.figure_format = 'svg'
import emcee
ac = emcee.autocorr
x = d[:,0]
x.shape
acf = ac.function(d[:,5])
plt.plot(acf)
Explanation: So the acceptance fraction is about 84%, which seems too high.  It should be closer to 23%.  So we should increase the typical step size.
emcee
End of explanation
<END_TASK>