Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active June 16, 2020 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/645336f7f33dfb9eb405b4ad4eb9e000 to your computer and use it in GitHub Desktop.
Save aniruddha27/645336f7f33dfb9eb405b4ad4eb9e000 to your computer and use it in GitHub Desktop.
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