# Import Library
from sklearn.neighbors import KNeighborsClassifier

# #Assumed you have, X (predictor) and Y (target) for training data set and  #
# x_test(predictor) of test_dataset # Create KNeighbors classifier
model = KNeighborsClassifier(n_neighbors=6)  # default value for n_neighbors is 5

# Train the model using the training sets and check score
model.fit(X, y)
# Predict Output
predicted = model.predict(x_test)
