Skip to content

Instantly share code, notes, and snippets.

@sgsg704
Created September 9, 2021 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgsg704/f882b51b991f6f387bdcf355e3e9bf1f to your computer and use it in GitHub Desktop.
Save sgsg704/f882b51b991f6f387bdcf355e3e9bf1f to your computer and use it in GitHub Desktop.
# confusion matrix
cmap1 = sns.diverging_palette(275,150, s=40, l=65, n=6)
plt.subplots(figsize=(12,8))
cf_matrix = confusion_matrix(y_test, y_pred)
sns.heatmap(cf_matrix/np.sum(cf_matrix), cmap = cmap1, annot = True, annot_kws = {'size':15})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment