From 08087d91693efc692d8731b9dfdd5c45383e0a55 Mon Sep 17 00:00:00 2001 From: schubert <schubert@coll.mpg.de> Date: Thu, 18 Jul 2019 16:13:38 +0200 Subject: [PATCH] error finding --- Scripts/Analysis_final_mult.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Scripts/Analysis_final_mult.py b/Scripts/Analysis_final_mult.py index 83090f0e..57589acb 100644 --- a/Scripts/Analysis_final_mult.py +++ b/Scripts/Analysis_final_mult.py @@ -40,8 +40,10 @@ savedir = '/draco/ptmp/mschuber/PAN/Data/results/' #path = '../Data/pan19-celebrity-profiling-training-dataset-2019-01-31/stratified_subsample/' subana_l = ['org/', 'min_tweets_1000/', 'complete_balance/'] +subana_l = ['org/'] subsets_l = [200, 500, 1000, 2000] +subsets_l = [200] classifiers = ['SVM'] @@ -612,7 +614,7 @@ def plotter(subsets, subana, phases, labels): an=an, label=label, group='life_phase')) - plt.close() + @@ -653,8 +655,12 @@ def plotter(subsets, subana, phases, labels): cnf_matrix = confusion_matrix(df_dic[st][an]['df'][an+'_'+str(st)+'_life_phase'], life_ph_pred_auth, labels=phases) + print(cnf_matrix) + print(np.shape(cnf_matrix)) + print(len(phases)) f = plt.figure() plot_confusion_matrix(cnf_matrix, classes=phases,title=None, ax=ax) + plt.show() plt.tight_layout() f.savefig(savedir+'heatmaps/cm_{st}_{an}_{label}_{group}.png'.format(st = st, an=an, label=label, -- GitLab