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)
aW1wb3J0IG51bXB5IGFzIG5wCmZyb20gc2tsZWFybi5uZWlnaGJvcnMgaW1wb3J0IEtOZWlnaGJvcnNDbGFzc2lmaWVyCmZyb20gc2tsZWFybi5tb2RlbF9zZWxlY3Rpb24gaW1wb3J0IHRyYWluX3Rlc3Rfc3BsaXQKZnJvbSBza2xlYXJuLm1ldHJpY3MgaW1wb3J0IGFjY3VyYWN5X3Njb3JlCng9bnAuYXJyYXkoW1szLDVdLFs0LDddLFs1LDNdLFs2LDRdLFs4LDJdLFs5LDZdXSkKeT1ucC5hcnJheShbMCwwLDEsMSwxLDBdKQp4X3RyYWluLHhfdGVzdCx5X3RyYWluLHlfdGVzdD10cmFpbl90ZXN0X3NwbGl0KHgseSx0ZXN0X3NpemU9MC4yLHJhbmRvbV9zdGF0ZT00MikKbW9kZWw9S05laWdoYm9yc0NsYXNzaWZpZXIobl9uZWlnaGJvcnM9MykKbW9kZWwuZml0KHhfdHJhaW4seV90cmFpbikKeV9wcmVkPW1vZGVsLnByZWRpY3QoeF90ZXN0KQphY2N1cmFjeT1hY2N1cmFjeV9zY29yZSh5X3Rlc3QseV9wcmVkKQpwcmludCgiQWNjdXJhY3k6IixhY2N1cmFjeSk=