Skip to content

Instantly share code, notes, and snippets.

@strubell
Created May 18, 2018 16:44
Show Gist options
  • Save strubell/a865cb7a2305c3971f329086b3ce463a to your computer and use it in GitHub Desktop.
Save strubell/a865cb7a2305c3971f329086b3ce463a to your computer and use it in GitHub Desktop.
from __future__ import division
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import os
from matplotlib import rc
# rc('font',**{'family':'serif', 'serif':['Times']})
# rc('text', usetex=True)
# F1 of (SA, LISA, LISA+DM, LISA+Gold), LAS of (LISA, DM)
scores_2005 = np.genfromtxt("srl_comparison_2005.txt", names=['F1_SA', 'F1_LISA', 'F1_LISA_DM', 'F1_LISA_Gold', 'LAS_LISA', 'LAS_DM'])
fig1, ax1 = plt.subplots()
ax1.scatter(scores_2005['F1_LISA'], scores_2005['LAS_LISA'], alpha=0.5)
ax1.scatter(scores_2005['F1_LISA_DM'], scores_2005['LAS_DM'], alpha=0.5)
ax1.set_ylabel('LAS')
ax1.set_xlabel('F1')
plt.legend(['LISA', 'LISA+DM'])
scores_2012 = np.genfromtxt("srl_comparison_2012.txt", names=['F1_SA', 'F1_LISA', 'F1_LISA_DM', 'F1_LISA_Gold', 'LAS_LISA', 'LAS_DM'])
fig2, ax2 = plt.subplots()
ax2.scatter(scores_2012['F1_LISA'], scores_2012['LAS_LISA'], alpha=0.5)
ax2.scatter(scores_2012['F1_LISA_DM'], scores_2012['LAS_DM'], alpha=0.5)
ax2.set_ylabel('LAS')
ax2.set_xlabel('F1')
plt.legend(['LISA', 'LISA+DM'])
plt.tight_layout()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment