K-Nearest-Neighbors-Simulation-using-Python
Following previous simulation, I continue to simulate the data through K-Nearest-Neighbors simulation.
-
Import preprocessing and define X_train_s
-
Import K Neighbors Classifier from sklearn
-
Define confusion matrix and accuracy score from X_train_S
-
Define gridsearch CV to implement fit and score method
-
Search the best parameters, optimised KNN, define confusion and accuracy score