CV in GridSearchCV

I suggest adding some explanation in this notebook about CV in GridSearchCV, which indicates that this class uses the cross_validate function to do the search.
It was somehow unclear and confusing, especially later in the “Evaluation and hyperparameter tuning” notebook.

In reality, it does not use cross_validate but rather does cross-validation internally.

It is true that we don’t explicitly state that cross-validation happens. We can make the following paragraph more explicit:

In the previous exercise we used one for loop for each hyperparameter to find the best combination over a fixed grid of values. GridSearchCV is a scikit-learn class that implements a very similar logic with less repetitive code.

And then, just add a note about the split#_test_score reported in cv_results to make it obvious that we did such evaluation internally.

1 Like

Thank you for the explanation. That seems very helpful.