In [22]:
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from matplotlib import rc
import corner
from bigmali.hyperparameter import get
rc('text', usetex=True)

In [141]:
data = pd.read_csv('~/Code/BigMaLI/src/output.txt', delimiter=' ', header=None)[:3013]
weights=data[4].as_matrix()
data = data[[0,1,2,3]].as_matrix()

In [146]:
np.exp(np.sort(weights - max(weights)))


Out[146]:
array([  0.00000000e+00,   0.00000000e+00,   0.00000000e+00, ...,
         2.61565821e-68,   5.50825500e-08,   1.00000000e+00])

In [76]:
a1,a2,a3,a4,S = get()
corner.corner(data, truths=[a1,a2,a4,S]);


Best


In [133]:
import matplotlib.colors as colors
ma1, ma2, ma4, maS = data[weights == weights.max()][0]
best = [ma1, ma2, ma4, maS]
truth = [a1, a2, a4, S]
labels = [r'$\alpha_1$', r'$\alpha_2$', r'$\alpha_4$', r'$S$']
for i in xrange(4):
    for j in xrange(4):
        plt.subplot(4,4,i*4+j+1)
        plt.scatter(data[:100,i], data[:100,j], alpha=.6)
        plt.scatter(best[i], best[j], color='gold')
        plt.scatter(truth[i], truth[j], color='red')
        plt.xlabel(labels[i])
        plt.ylabel(labels[j])
plt.gcf().set_size_inches((12,12))
plt.tight_layout()


Second Best


In [137]:
ma1, ma2, ma4, maS = data[weights == np.sort(weights)[-2]][0]
best = [ma1, ma2, ma4, maS]
truth = [a1, a2, a4, S]
labels = [r'$\alpha_1$', r'$\alpha_2$', r'$\alpha_4$', r'$S$']
for i in xrange(4):
    for j in xrange(4):
        plt.subplot(4,4,i*4+j+1)
        plt.scatter(data[:100,i], data[:100,j], alpha=.6)
        plt.scatter(best[i], best[j], color='gold')
        plt.scatter(truth[i], truth[j], color='red')
        plt.xlabel(labels[i])
        plt.ylabel(labels[j])
plt.gcf().set_size_inches((12,12))
plt.tight_layout()


Worst


In [140]:
ma1, ma2, ma4, maS = data[weights == np.sort(weights)[0]][0]
best = [ma1, ma2, ma4, maS]
truth = [a1, a2, a4, S]
labels = [r'$\alpha_1$', r'$\alpha_2$', r'$\alpha_4$', r'$S$']
for i in xrange(4):
    for j in xrange(4):
        plt.subplot(4,4,i*4+j+1)
        plt.scatter(data[:100,i], data[:100,j], alpha=.6)
        plt.scatter(best[i], best[j], color='gold')
        plt.scatter(truth[i], truth[j], color='red')
        plt.xlabel(labels[i])
        plt.ylabel(labels[j])
plt.gcf().set_size_inches((12,12))
plt.tight_layout()