SHARE
TWEET

Untitled

a guest Sep 21st, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top