In [1]:
%cd ~/NetBeansProjects/ExpLosion/
from notebooks.common_imports import *
from gui.models import get_ci
sns.timeseries.algo.bootstrap = my_bootstrap
sns.categorical.bootstrap = my_bootstrap
In [2]:
d = {'labelled': 'reuters21578/r8-tagged-grouped',
'expansions__noise': 0,
'expansions__vectors__composer': 'Add',
'expansions__vectors__rep': 0,
'expansions__vectors__avg':0,
'expansions__vectors__unlabelled_percentage': 100}
In [3]:
ids = Experiment.objects.filter(**d).values_list('id', flat=True)
print('experiments are', ids, len(ids))
df = dataframe_from_exp_ids(ids, {'id':'id',
'unlab':'expansions__vectors__unlabelled',
'algo':'expansions__vectors__algorithm',
'k':'expansions__k'}, abbreviate=False)
In [4]:
performance_table(df)
Out[4]:
In [5]:
sns.factorplot(data=df[df.k=='3'], y='Accuracy', x='unlab', hue='algo',
ci=100, kind='bar');
In [6]:
sign_df = get_demsar_params(ids, ['expansions__vectors__unlabelled',
'expansions__vectors__algorithm',
'expansions__k'])[0]
sign_df[(sign_df.significant==True)&(sign_df.name2=='gigaw-w2v-3')].sort('mean_diff')
Out[6]:
In [7]:
for i in ids:
cv_score = Results.objects.get(id=i, classifier=CLASSIFIER).accuracy_mean
bs_score = get_ci(i)[0]
print((cv_score - bs_score)*100)
In [ ]: