Created
March 15, 2021 11:45
008_knn
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
from sklearn.neighbors import KNeighborsClassifier | |
knn_model = KNeighborsClassifier() | |
knn_model.fit(X_train, y_train) | |
knn_preds = knn_model.predict(X_test) | |
accuracy_score(y_test, knn_preds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment