Machine LearningLesson 85Free preview
Grid Search
This lesson is part of Python · All levels
Summary
Grid search is a systematic search technique for finding the best combinations of hyperparameters of a model. The combination of parameters is defined in the param_grid, then GridSearchCV tries the entire combination while performing cross validation on each experiment. The best results can be accessed through the best_params_ and best_score_ attributes. This approach saves manual guesses in setting model parameters.
Key points
- Grid search evaluates the entire combination of hyperparameters on the param_grid
- GridSearchCV combines grid search with cross validation
- Best_params_ and best_score_ keep the best combined results
- Cross validation makes the selection of parameters more reliable
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.