Setting up a simple GridSearchCV in Scikit-learn
In most machine learning projects we need to train the model with different model parameters so as to get best results out of the model. Also, we need to divide the training datasets into training and validation datasets while training the model. This method improves the machine learning model while avoiding over-fitting. GridSearchCV in Scikit-learn package provides all these functionalities. Using GridSearchCV , we can make several training and validation sets automatically without needing to code it ourselves. We will see here how to set up a simple GridSearchCV using k-neighborhood search algorithm.