Skip to content

Instantly share code, notes, and snippets.

@aateg
Created June 29, 2020 19:12
Show Gist options
  • Save aateg/e983063a3ad98c0a40ff4e241053fee0 to your computer and use it in GitHub Desktop.
Save aateg/e983063a3ad98c0a40ff4e241053fee0 to your computer and use it in GitHub Desktop.
from sklearn.metrics import roc_auc_score
"""
Função que calcula a área sob a curva ROC.
Recebe os valores preditos e os valores
do teste para calcular a area. Seu retorno
é um valor no intervalo [0, 1].
"""
auc_score = roc_auc_score(y_true, y_scores)
print(auc_score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment