In [1]:
%cd ~/NetBeansProjects/ExpLosion/
from notebooks.common_imports import *
In [2]:
# reported accuracies: Add=50%, Mult=57%, SOTA=81.6 (Turney holistic model)
df = pd.read_csv('../thesisgenerator/intrinsic_turney_phraselevel.csv')
In [3]:
df.head()
Out[3]:
In [4]:
g = sns.factorplot(data=df, x='unigrams', hue='composer', col='kind',
y='accuracy', kind='bar', aspect=1.5)
g.set_xticklabels(rotation=30);
sns.despine(left=True)
plt.savefig('plot-intrinsic-turney.pdf', format='pdf', dpi=300, bbox_inches='tight', pad_inches=0.1)
In [5]:
sns.factorplot(data=df, y='coverage', x='kind', col='unigrams', kind='bar')
Out[5]:
In [6]:
df.groupby(['unigrams', 'composer', 'kind']).coverage.mean()
Out[6]:
Task is set up to test if models are skating by on lexical overlap. I am not disallowing it here as it would be slightly unfair, but then the results of this test will not be compatible with my DC results. Should do both versions.
See §4.2 in (Turney, 2012), esp. eq 30/31, table 15 for explanation of how he does the evaluation
In [ ]: