jiehou commited on
Commit
7e0b543
·
1 Parent(s): 42527a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -247,10 +247,10 @@ def visualize_ROC(set_threshold,set_input):
247
  plt.ylim(0, 1)
248
  #xi = (c1 - c2) / (m2 - m1)
249
  #yi = m1 * xi + c1
250
- #plt.axvline(x=set_threshold, color='gray', linestyle='--')
251
- #plt.axhline(y=f1_score_cur, color='gray', linestyle='--')
252
- #plt.scatter(set_threshold, f1_score_cur, color='red', s=300)
253
- #plt.scatter(set_threshold, g_mean_cur, color='red', s=300)
254
 
255
  ax.set_facecolor("white")
256
 
@@ -263,8 +263,8 @@ def visualize_ROC(set_threshold,set_input):
263
  plt.xlabel('Threshold cut-off')
264
  plt.ylabel('F1-score & G-mean')
265
  plt.legend(loc='upper left')
266
- #plt.text(set_threshold, f1_score_cur, 'F1-score:%s' % (round(f1_score_cur,2)))
267
- #plt.text(set_threshold, g_mean_cur, 'G-mean:%s' % (round(g_mean_cur,2)))
268
  plt.title("Threshold tuning curves (F1-score & G-mean)", fontsize=20)
269
  plt.tight_layout()
270
 
 
247
  plt.ylim(0, 1)
248
  #xi = (c1 - c2) / (m2 - m1)
249
  #yi = m1 * xi + c1
250
+ plt.axvline(x=set_threshold, color='gray', linestyle='--')
251
+ plt.axhline(y=f1_score_cur, color='gray', linestyle='--')
252
+ plt.scatter(set_threshold, f1_score_cur, color='red', s=300)
253
+ plt.scatter(set_threshold, g_mean_cur, color='red', s=300)
254
 
255
  ax.set_facecolor("white")
256
 
 
263
  plt.xlabel('Threshold cut-off')
264
  plt.ylabel('F1-score & G-mean')
265
  plt.legend(loc='upper left')
266
+ plt.text(set_threshold, f1_score_cur, 'F1-score:%s' % (round(f1_score_cur,2)))
267
+ plt.text(set_threshold, g_mean_cur, 'G-mean:%s' % (round(g_mean_cur,2)))
268
  plt.title("Threshold tuning curves (F1-score & G-mean)", fontsize=20)
269
  plt.tight_layout()
270