Skip to content

Commit 95483ce

Browse files
committed
Add script to plot model F1 histogram
1 parent 6bd43ea commit 95483ce

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

models/plot_model_f1.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import matplotlib.pyplot as plt
2+
from gilda.grounder import load_gilda_models
3+
4+
5+
if __name__ == '__main__':
6+
models = load_gilda_models(-1)
7+
f1s = [m.stats['f1']['mean'] for m in models.values()]
8+
plt.ion()
9+
plt.figure(figsize=(8, 4))
10+
plt.hist(f1s, 100, color='gray')
11+
plt.xlabel('Mean F1 of disambiguation model', fontsize=18)
12+
plt.ylabel('Number of models', fontsize=18)
13+
plt.xticks(fontsize=14)
14+
plt.yticks(fontsize=14)
15+
plt.axvline(x=0.7, linestyle='--', color='gray')
16+
plt.subplots_adjust(left=0.114, right=0.98, bottom=0.157, top=0.97)
17+
plt.show()
18+
plt.savefig('gilda_model_f1_plots.pdf')

0 commit comments

Comments
 (0)