application_vnd.jupyter.stderr_output_3.png text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay, classification_report

from sklearn.neighbors import KNeighborsClassifier

import matplotlib.pyplot as plt

model_knn = KNeighborsClassifier()
model_knn.fit(X_train, y_train)

from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay, classification_report
print(classification_report(y_test, model_knn.predict(X_test)))
cm_knn = confusion_matrix(y_test, model_knn.predict(X_test))
ConfusionMatrixDisplay(cm_knn).plot()
plt.show()