Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. # Step 7 - Confusion Matrix
  2. from sklearn import metrics
  3. cm = metrics.confusion_matrix(y_test, y_pred)
  4. print(cm)
  5. accuracy = metrics.accuracy_score(y_test, y_pred)
  6. print("Accuracy score:",accuracy)
  7. precision = metrics.precision_score(y_test, y_pred)
  8. print("Precision score:",precision)
  9. recall = metrics.recall_score(y_test, y_pred)
  10. print("Recall score:",recall)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement