-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathhist.py
More file actions
executable file
·34 lines (29 loc) · 829 Bytes
/
hist.py
File metadata and controls
executable file
·34 lines (29 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import collections
with open("predictions/predictions_original.csv") as f:
ef_original = []
f.readline()
for l in f:
ef_original.append(float(l.split(",")[-1]))
with open("predictions/predictions_mirror.csv") as f:
ef_mirror = []
f.readline()
for l in f:
ef_mirror.append(float(l.split(",")[-1]))
fig = plt.figure(figsize=(3, 3))
plt.hist([ef_mirror, ef_original], bins=range(0, 101, 5))
plt.legend(["Mirror", "Original"])
plt.xlabel("EF")
plt.ylabel("# Videos")
plt.tight_layout()
plt.savefig("hist.pdf")
plt.close(fig)
fig = plt.figure(figsize=(3, 3))
plt.scatter(ef_mirror, ef_original, s=1)
plt.xlabel("EF (mirror)")
plt.ylabel("EF (original)")
plt.tight_layout()
plt.savefig("scatter.pdf")
plt.close(fig)