What does GridSearchCV do with a parameter grid?
Correct answer
B. Trains and cross-validates every listed combination
17 views
B. Trains and cross-validates every listed combination
17 views
GridSearchCV enumerates the Cartesian product of the supplied parameter values, evaluates each combination with cross-validation, and keeps the one with the best mean score in best_params_. It exposes the refitted winner as best_estimator_, which is trained on all the data. The cost grows multiplicatively with grid size, so RandomizedSearchCV is used when the space is large.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is B? Ask here and get an explanation.