-
-
Save Karts27/c0730e6c7fac636ef8deba79b2c5a2cd 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
#Plotting a confusion matrix for checking the performance of our model | |
Y_pred = np.argmax(model.predict(X_test), axis = 1) | |
cnf = confusion_matrix(Y_test.argmax(axis = 1), Y_pred) | |
df_cnf = pd.DataFrame(cnf, range(2), range(2)) | |
sns.set(font_scale = 2) | |
sns.heatmap(df_cnf, annot = True) | |
plt.title("Confusion Matrix") | |
plt.xlabel("True Values") | |
plt.ylabel("Prediction Values") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment