text_plain_output_1.png
from sklearn.neighbors import KNeighborsClassifier

from sklearn.neighbors import KNeighborsRegressor

x_train.shape

y_train.shape

knn = KNeighborsRegressor(n_neighbors=5, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', metric_params=None, n_jobs=None)

knn = KNeighborsClassifier()
knn.fit(x_train, y_train)
score_knn = knn.score(x_test, y_test)
print('The accuracy of the KNN Model is', score_knn)