K-Nearest-Neighbors-Simulation-using-Python

Following previous simulation, I continue to simulate the data through K-Nearest-Neighbors simulation.

  1. Import preprocessing and define X_train_s Text image1

  2. Import K Neighbors Classifier from sklearn Text image1

  3. Define confusion matrix and accuracy score from X_train_S text image1

  4. Define gridsearch CV to implement fit and score method text image1

  5. Search the best parameters, optimised KNN, define confusion and accuracy score text image1