Skip to content

Instantly share code, notes, and snippets.

@ShivnarenSrinivasan
Created June 22, 2022 06:53
Show Gist options
  • Save ShivnarenSrinivasan/5e664dda791d6bd255b4f3abb1eb14f2 to your computer and use it in GitHub Desktop.
Save ShivnarenSrinivasan/5e664dda791d6bd255b4f3abb1eb14f2 to your computer and use it in GitHub Desktop.
ML Use Cases Exam
>>> y_true = [1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0]
>>> y_pred = [0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1]
>>> from sklearn import metrics
>>> metrics.precision_score(y_true, y_pred)
0.5714285714285714
>>> metrics.recall_score(y_true, y_pred)
0.5714285714285714
>>> metrics.f1_score(y_true, y_pred)
0.5714285714285714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment