Skip to content

Instantly share code, notes, and snippets.

@supalogix
Created November 17, 2015 00:20
Show Gist options
  • Save supalogix/42ccbaacc35e019322c6 to your computer and use it in GitHub Desktop.
Save supalogix/42ccbaacc35e019322c6 to your computer and use it in GitHub Desktop.
###
### Print Accuracy and Confusion Matrix
###
output = clf.predict(X_2)
from sklearn.metrics import confusion_matrix
matrix = confusion_matrix(output, Y_2)
score = clf.score(X_2, Y_2)
print "accuracy: {0}".format(score.mean())
print matrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment