Hyperparameter Tuning with RandomizedSearchCV
Grid search goes over the entire search space and trains a model or estimator for every combination of parameters. Randomized search goes over only some of the combinations. This is a more optimal use of resources and still provides the benefits of hyperparameter tuning and cross-validation. You will be looking at this in depth in Chapter 8, Hyperparameter Tuning.
Have a look at the following exercise.
Exercise 7.08: Using Randomized Search for Hyperparameter Tuning
The goal of this exercise is to perform hyperparameter tuning using randomized search and cross-validation.
The following steps will help you complete this exercise:
- Open a new Colab notebook file.
- Import
pandas
:import pandas as pd
In this step, you import
pandas
. You will make use of it in the next step. - Create
headers
:_headers = ['buying', 'maint', 'doors', 'persons', 'lug_boot', 'safety&apos...