Created
May 2, 2014 05:04
-
-
Save marcelcaraciolo/da2d7b94e10deffdbfdc to your computer and use it in GitHub Desktop.
This file contains 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
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.metrics import confusion_matrix | |
clf = KNeighborsClassifier(n_neighbors=13) | |
clf.fit(X_train, y_train) | |
print "done" | |
print "="*20 | |
print clf | |
print "Confusion Matrix" | |
print "="*40 | |
print confusion_matrix(y_test, clf.predict(X_test)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment