JERNGOC commited on
Commit
94a158a
·
verified ·
1 Parent(s): 35d05a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -91,10 +91,11 @@ if uploaded_file is not None:
91
  st.pyplot(fig)
92
 
93
  # ROC 曲線
94
- fpr_stack, tpr_stack, _ = roc_curve(y_test, y_pred_stack_proba)
 
95
  roc_auc_stack = auc(fpr_stack, tpr_stack)
96
 
97
- fpr_vote, tpr_vote, _ = roc_curve(y_test, y_pred_vote_proba)
98
  roc_auc_vote = auc(fpr_vote, tpr_vote)
99
 
100
  fig, ax = plt.subplots()
 
91
  st.pyplot(fig)
92
 
93
  # ROC 曲線
94
+ # 假設 2 是正標籤
95
+ fpr_stack, tpr_stack, _ = roc_curve(y_test, y_pred_stack_proba, pos_label=2)
96
  roc_auc_stack = auc(fpr_stack, tpr_stack)
97
 
98
+ fpr_vote, tpr_vote, _ = roc_curve(y_test, y_pred_vote_proba, pos_label=2)
99
  roc_auc_vote = auc(fpr_vote, tpr_vote)
100
 
101
  fig, ax = plt.subplots()