Skip to content

Instantly share code, notes, and snippets.

@HeenaR17
Created October 25, 2020 19:33
Show Gist options
  • Save HeenaR17/359107e20c98554c1a920cd1f896b2f7 to your computer and use it in GitHub Desktop.
Save HeenaR17/359107e20c98554c1a920cd1f896b2f7 to your computer and use it in GitHub Desktop.
from sklearn.metrics import confusion_matrix
lr_cm = confusion_matrix(y_test, lr_y_pred)
plt.figure(figsize=(10,7))
sns.heatmap(data=nb_cm, annot=True, cmap="Blues", xticklabels=['Real', 'Fake'], yticklabels=['Real', 'Fake'])
plt.xlabel('Predicted values')
plt.ylabel('Actual values')
plt.title('Confusion Matrix for Logistic Regression Algorithm')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment