diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2015-03-30 15:01:56 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2015-03-30 15:01:56 -0400 |
| commit | b84dddecf2eab982941704a43663cf643be027d3 (patch) | |
| tree | 273afacb4e2d2e043a6bbf75f774d8752e9fc202 /experiments/old_stuff/plot.py | |
| parent | 68187fcfb505e87e5853c5a1b2e1dc073278a2ba (diff) | |
| download | criminal_cascades-b84dddecf2eab982941704a43663cf643be027d3.tar.gz | |
Archive old code
Diffstat (limited to 'experiments/old_stuff/plot.py')
| -rw-r--r-- | experiments/old_stuff/plot.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/experiments/old_stuff/plot.py b/experiments/old_stuff/plot.py new file mode 100644 index 0000000..cbea485 --- /dev/null +++ b/experiments/old_stuff/plot.py @@ -0,0 +1,21 @@ +from mpl_toolkits.mplot3d import Axes3D +from matplotlib import cm +import matplotlib.pyplot as plt +import numpy as np + +with open("results3.txt") 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[2]) + print am + beta, alpha, l = zip(*values) + + fig = plt.figure(figsize=(12, 8)) + ax = fig.gca(projection='3d') + + ax.plot_trisurf(beta, alpha, l, cmap=cm.jet, linewidth=0.001) + plt.xlabel("Beta") + plt.ylabel("Alpha") + ax.set_zlabel('Likelihood') + #plt.savefig("ll.pdf") + plt.show() |
