Skip to content

Instantly share code, notes, and snippets.

@aateg
Created June 29, 2020 21:55
Show Gist options
  • Save aateg/4f02a9324139fbfa40dfc07bd594c322 to your computer and use it in GitHub Desktop.
Save aateg/4f02a9324139fbfa40dfc07bd594c322 to your computer and use it in GitHub Desktop.
from sklearn.metrics import confusion_matrix
tn, fp, fn, tp = confusion_matrix(y_test, y_predito).ravel()
precision = tp/(tp + fp)
recall = tp/(tp + fn)
fpr = fp/(fp + tn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment