# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # MCMC Step Size
# ## 01 - Exploratory
# ### Author: <NAME>
# Thursday, January 21, 2016

# We want to know more about optimal step sizes.

# +
import h5py

f = h5py.File('../data/mc.hdf5', mode='r')

list(f.keys())
# -

d = f['samples']

d.value.shape

# It's a $50000 \times 6$ dataset.

import matplotlib.pyplot as plt
% matplotlib inline
% config InlineBackend.figure_format = 'retina'
import seaborn as sns

from IPython.display import Image

# !chain.py --files ../data/mc.hdf5 --chain --burn=10000

Image(filename='walkers.png')

# !chain.py --files ../data/mc.hdf5 --triangle --burn=10000

Image(filename='triangle.png')

# Not bad!  There is little constraint on $\log{g}, Z$, but we sort of expected that.

# !chain.py --files ../data/mc.hdf5 --cov

Image(filename='cor_coefficient.png')

import numpy as np

ojs = np.load('opt_jump.npy')

ojs.shape

# # The end.

StarcoderdataJupyterScriptsDedupFiltered