import numpy as np
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
x=np.array([[3,5],[4,7],[5,3],[6,4],[8,2],[9,6]])
y=np.array([0,0,1,1,1,0])
x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.2,random_state=42)
model=KNeighborsClassifier(n_neighbors=3)
model.fit(x_train,y_train)
y_pred=model.predict(x_test)
accuracy=accuracy_score(y_test,y_pred)
print("Accuracy:",accuracy)
aW1wb3J0IG51bXB5IGFzIG5wCmZyb20gc2tsZWFybi5uZWlnaGJvcnMgaW1wb3J0IEtOZWlnaGJvcnNDbGFzc2lmaWVyCmZyb20gc2tsZWFybi5tb2RlbF9zZWxlY3Rpb24gaW1wb3J0IHRyYWluX3Rlc3Rfc3BsaXQKZnJvbSBza2xlYXJuLm1ldHJpY3MgaW1wb3J0IGFjY3VyYWN5X3Njb3JlCgp4PW5wLmFycmF5KFtbMyw1XSxbNCw3XSxbNSwzXSxbNiw0XSxbOCwyXSxbOSw2XV0pCnk9bnAuYXJyYXkoWzAsMCwxLDEsMSwwXSkKCnhfdHJhaW4seF90ZXN0LHlfdHJhaW4seV90ZXN0PXRyYWluX3Rlc3Rfc3BsaXQoeCx5LHRlc3Rfc2l6ZT0wLjIscmFuZG9tX3N0YXRlPTQyKQoKbW9kZWw9S05laWdoYm9yc0NsYXNzaWZpZXIobl9uZWlnaGJvcnM9MykKbW9kZWwuZml0KHhfdHJhaW4seV90cmFpbikKCnlfcHJlZD1tb2RlbC5wcmVkaWN0KHhfdGVzdCkKCmFjY3VyYWN5PWFjY3VyYWN5X3Njb3JlKHlfdGVzdCx5X3ByZWQpCnByaW50KCJBY2N1cmFjeToiLGFjY3VyYWN5KQo=