Skip to content

Instantly share code, notes, and snippets.

@aagnone3
Created October 30, 2020 00:20
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 aagnone3/36ef004b5e0bab9380483bcb3a38e444 to your computer and use it in GitHub Desktop.
Save aagnone3/36ef004b5e0bab9380483bcb3a38e444 to your computer and use it in GitHub Desktop.
sf_crime_16.py
c = confusion_matrix(y_validation, y_pred > 0.5, normalize='true')
fig = ff.create_annotated_heatmap(
c,
x=['Not Target', 'Target'],
y=['Not Target', 'Target'],
colorscale="Greens"
)
fig.update_xaxes(side="top", title="Prediction")
fig.update_yaxes(title="Truth")
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment