Last active
June 16, 2020 17:53
-
-
Save aniruddha27/645336f7f33dfb9eb405b4ad4eb9e000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.metrics import roc_curve | |
# roc curve for models | |
fpr1, tpr1, thresh1 = roc_curve(y_test, pred_prob1[:,1], pos_label=1) | |
fpr2, tpr2, thresh2 = roc_curve(y_test, pred_prob2[:,1], pos_label=1) | |
# roc curve for tpr = fpr | |
random_probs = [0 for i in range(len(y_test))] | |
p_fpr, p_tpr, _ = roc_curve(y_test, random_probs, pos_label=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment