diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2015-06-07 22:23:39 -0700 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2015-06-07 22:23:39 -0700 |
| commit | e5dada202c34521618bf82a086093c342841e5e8 (patch) | |
| tree | dd7c640ed2bd77ce5e6b0ae050e6662c21cc3b43 /experiments/plot3d.py | |
| parent | a29d738721db46b0ca3b7b5b3ffd282ad3f25909 (diff) | |
| download | criminal_cascades-e5dada202c34521618bf82a086093c342841e5e8.tar.gz | |
Project cleanup before handing it to Ben
Diffstat (limited to 'experiments/plot3d.py')
| -rw-r--r-- | experiments/plot3d.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/experiments/plot3d.py b/experiments/plot3d.py new file mode 100644 index 0000000..64c144d --- /dev/null +++ b/experiments/plot3d.py @@ -0,0 +1,23 @@ +from mpl_toolkits.mplot3d import Axes3D +from matplotlib import cm +import matplotlib.pyplot as plt +import numpy as np + +with open("out.log") as fh: + values = [map(float, line.strip().split()) for line in fh] + #values = [(b, a, l) for (b, a, l) in values if b >= 0.04] + am = max(values, key=lambda x: x[4]) + am[0] = 1./am[0] + print am + alpha, delta, beta, _ , l = zip(*values) + alpha = 1./np.array(alpha) + + fig = plt.figure(figsize=(12, 8)) + ax = fig.gca(projection='3d') + + ax.plot_trisurf(alpha, delta, l, cmap=cm.jet, linewidth=0.001) + plt.xlabel("alpha") + plt.ylabel("delta") + ax.set_zlabel('Likelihood') + #plt.savefig("ll.pdf") + plt.show() |
