In [10]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
N = 5
macMeans = (0.22, 0.20, 0.18, 0.11, 0.24)
macStd = (0.021, 0.032, 0.048, 0.015, 0.077)
ind = np.arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
fig, ax = plt.subplots()
rects1 = ax.bar(ind, macMeans, width, color='b', yerr=macStd)
micMeans = (0.21, 0.18, 0.16, 0.05, 0.21)
micStd = (0.02, 0.034, 0.049, 0.011, 0.056)
rects2 = ax.bar(ind + width, micMeans, width, color='y', yerr=micStd)
# add some text for labels, title and axes ticks
ax.set_ylabel('Scores')
ax.set_title('Macro-Micro F1 scores. BlogCatalog')
ax.set_xticks(ind + width)
ax.set_xticklabels(('SP', 'DW', 'LINE', 'N2V', 'MAGE'))
ax.legend((rects1[0], rects2[0]), ('Macro avg.', 'Micro avg.'))
plt.savefig('blogcatalog3.pdf')
In [29]:
num_neg = np.linspace(10,60, 6)
MAGEscore = np.array([0.1495, 0.1798, 0.1853, 0.2111, 0.2274, 0.2401])
DWscore = np.array([0.1950, 0.1991, 0.2012, 0.2144, 0.2193, 0.2212])
fig, ax = plt.subplots()
plt.plot(num_neg, MAGEscore, 'bo-')
plt.plot(num_neg, DWscore, 'ro-')
ax.set_ylabel('Scores')
ax.set_title('Macro F1 scores. BlogCatalog')
ax.legend(('MAGE', 'DW'))
plt.savefig('blogcatalog3_nce.pdf')
In [23]:
num_neg
Out[23]:
In [ ]: