Created
October 25, 2020 19:32
-
-
Save HeenaR17/b97a103e6fab84e9d1330a88c443d699 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.metrics import confusion_matrix | |
nb_cm = confusion_matrix(y_test, nb_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 Multinomial Naive Bayes Algorithm') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment