Skip to content

Instantly share code, notes, and snippets.

@ravishchawla
Last active June 27, 2018 21:38
Show Gist options
  • Save ravishchawla/8ec8ba0440322bfe88b23bc7499c41fe to your computer and use it in GitHub Desktop.
Save ravishchawla/8ec8ba0440322bfe88b23bc7499c41fe to your computer and use it in GitHub Desktop.
# Obtain predictions
predictions = model.predict_classes(X_test)
# Convert Y_test to the same format as predictions
actuals = [0 if y[0] == 1 else 1 for y in Y_test];
# Use SkLearn's Metrics module
accuracy_score(predictions, actuals)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment