Skip to content

Instantly share code, notes, and snippets.

@sagarhowal
Created December 25, 2017 10:49
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 sagarhowal/f6ea89272f4d988de51318d9a2452840 to your computer and use it in GitHub Desktop.
Save sagarhowal/f6ea89272f4d988de51318d9a2452840 to your computer and use it in GitHub Desktop.
Predicting the Test set results and Confusion Matrix in Keras
# Predicting the Test set results
y_pred = classifier.predict(X_test)
y_pred = (y_pred > 0.5)
# Making the Confusion Matrix
from sklearn.metrics import confusion_matrix
cm = confusion_matrix(y_test, y_pred)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment