预测每个选定的
Train_features
样本分配到某一类别的概率:probs = classifier.predict_proba(Train_features)`
选择需要确定AUC的类。
preds = probs[:,1]
计算假阳性率、真阳性率以及可以清晰分离TP和TN的可能阈值。
fpr, tpr, threshold = metrics.roc_curve(Train_labels, preds)
roc_auc = metrics.auc(fpr, tpr)
print(max(threshold))
输出:1.97834