Skip to content

Commit

Permalink
Remove bug where I had plotted wrong parameters as maximum likelihood…
Browse files Browse the repository at this point in the history
… (due to removal of burn in samples from the plots)
  • Loading branch information
mirams committed Mar 1, 2017
1 parent 88f251a commit 9c0429a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified Figures/figure_3/figure_3.pdf
Binary file not shown.
6 changes: 4 additions & 2 deletions Figures/figure_3/plot_figure_3_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@
data = numpy.loadtxt('figure_3_c/MCMC_likelihood_and_samples.txt', skiprows=0)
likelihoods = data[:,0]
max_likelihood_index = numpy.argmax(likelihoods)
print('Maximum likelihood at index',max_likelihood_index)
print('Maximum likelihood at index ', max_likelihood_index)
max_likelihood_values = data[max_likelihood_index,:]

# Remove 'burn in'
data = data[50001:,:]
Expand Down Expand Up @@ -243,7 +244,8 @@
for label in ax.get_xticklabels():
label.set_rotation(305)
label.set_horizontalalignment("left")
ax.plot(data[max_likelihood_index,i+1], 0, 'kx', markersize=10, markeredgewidth=3, clip_on=False)
print('Max posterior density for P',i+1,' is at', max_likelihood_values[i+1])
ax.plot(max_likelihood_values[i+1], 0, 'kx', markersize=10, markeredgewidth=3, clip_on=False)
if i==8:
ax.get_xaxis().set_label_coords(+0.5,0.93)
else:
Expand Down

0 comments on commit 9c0429a

Please sign in to comment.