I'm running a python script that I've took from a website. It's a simple code that uses Iris dataset and performs a KNN classification on that dataset. But when I run this script I keep getting all of measurement scores as 1.0 which is I believe a wrong result. Where did I make the mistake?
Classification part of the script:
knn = KNeighborsClassifier(n_neighbors=5)
knn.fit(X_train, y_train)
y_pred = knn.predict(X_test)
print(confusion_matrix(y_test, y_pred))
print(classification_report(y_test, y_pred))
You can reach the full script from here