@@ -358,6 +358,7 @@ def getAUCTable(df, df_pr_pareto, print_table=False):
358
358
df_auc .set_index ("method" , inplace = True )
359
359
df_auc ["avg" ] = df_auc .mean (axis = 1 )
360
360
df_auc = df_auc .sort_values (by = "avg" , ascending = False )
361
+ df_auc .drop (["avg" ], axis = 1 , inplace = True )
361
362
362
363
bold_df = df_auc .apply (
363
364
lambda x : [
@@ -429,8 +430,8 @@ def get_threshold_df(threshold):
429
430
430
431
# Plot Precision Recall Pareto frontier for PCBS methods
431
432
plotPRPareto (df_pr_paretos , only_high_p = True ) #
432
- plt .savefig (base_addr + f"pr_uci .pdf" , bbox_inches = "tight" )
433
- print ("plotted pr_uci .pdf" )
433
+ plt .savefig (base_addr + f"pr_ngrams .pdf" , bbox_inches = "tight" )
434
+ print ("plotted pr_ngrams .pdf" )
434
435
435
436
# plot single example
436
437
threshold = 0.92
@@ -439,17 +440,17 @@ def get_threshold_df(threshold):
439
440
getAUCTable (df_pcbs , df_pr_pareto )
440
441
ax = plotPRPareto ({threshold :df_pr_pareto }, only_high_p = True , ncol = 3 )
441
442
ax .set_title ("" )
442
- plt .savefig (base_addr + f"pr_uci_ { threshold } .pdf" , bbox_inches = "tight" )
443
- print (f"plotted pr_uci_ { threshold } .pdf" )
443
+ plt .savefig (base_addr + f"pr_ngrams_ { threshold } .pdf" , bbox_inches = "tight" )
444
+ print (f"plotted pr_ngrams_ { threshold } .pdf" )
444
445
445
446
# Plot F_0.5 runtime Pareto frontier for PCBS methods
446
447
clusterers = df_pcbs ["Clusterer Name" ].unique ()
447
448
dfs , graphs = GetParetoDfs (df_pcbs )
448
449
ax = plotPareto (dfs , graphs , clusterers , draw_legend = False )
449
450
ax .set_title ("" )
450
451
plt .tight_layout ()
451
- plt .savefig (base_addr + f"time_f1_uci_ { threshold } .pdf" , bbox_inches = "tight" )
452
- print (f"plotted time_f1_uci_ { threshold } .pdf" )
452
+ plt .savefig (base_addr + f"time_f1_ngrams_ { threshold } .pdf" , bbox_inches = "tight" )
453
+ print (f"plotted time_f1_ngrams_ { threshold } .pdf" )
453
454
454
455
if __name__ == "__main__" :
455
456
base_addr = "results/"
0 commit comments