text_plain_output_1.png
from sklearn.metrics import accuracy_score

from sklearn.neighbors import KNeighborsClassifier

knn = KNeighborsClassifier(n_neighbors=5)
knn.fit(X_train, y_train)

y_pred = knn.predict(X_valid)

accuracy_score(y_pred, y_valid)