<jupyter_start><jupyter_text>**Training the model**<jupyter_code>x = df.drop("label",axis=1)
y = df["label"]
y.head()
from sklearn.neighbors import KNeighborsClassifier
model = KNeighborsClassifier(n_neighbors=70)
x_train, x_test, y_train, y_test = train_test_split(x,y, test_size=0.20)
model.fit(x_train, y_train)<jupyter_output><empty_output><jupyter_text>**Predicting the data**<jupyter_code>print(model.predict([[5,1,1,1,2,1,3,1,1]]))
print(model.predict([[9,8,7,7,5,8,9,9,8]]))
Y_pred = model.predict(x_test)
score = metrics.accuracy_score(y_test,Y_pred)
print(score*100,'%')<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup