Created
November 17, 2015 00:20
-
-
Save supalogix/42ccbaacc35e019322c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
### 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