Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Step 7 - Confusion Matrix
- from sklearn import metrics
- cm = metrics.confusion_matrix(y_test, y_pred)
- print(cm)
- accuracy = metrics.accuracy_score(y_test, y_pred)
- print("Accuracy score:",accuracy)
- precision = metrics.precision_score(y_test, y_pred)
- print("Precision score:",precision)
- recall = metrics.recall_score(y_test, y_pred)
- print("Recall score:",recall)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement