Skip to content

Instantly share code, notes, and snippets.

@massiung
Created November 15, 2018 14:12
Show Gist options
  • Save massiung/070795cbd8456b5b8d3cdb6f3ec7e0f8 to your computer and use it in GitHub Desktop.
Save massiung/070795cbd8456b5b8d3cdb6f3ec7e0f8 to your computer and use it in GitHub Desktop.
AUC
from sklearn.metrics import roc_auc_score
def auc(X, y, classifier):
y_score = classifier.predict_proba(X)[:, 1]
return roc_auc_score(y, y_score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment