Implementing Coarse-to-Fine Search
Coarse-to-Fine Search (CFS) is part of the Multi-Fidelity Optimization group that utilizes Grid Search and/or Random Search during the hyperparameter tuning process (see Chapter 6, Exploring Multi-Fidelity Optimization). Although CFS is not implemented directly in the sklearn
package, you can find the implemented custom class, CoarseToFineSearchCV
, in the repo mentioned in the Technical Requirements section.
Let’s use the same example and hyperparameter space as in the Implementing Random Search section, to see how CoarseToFineSearchCV
works in practice. Note that this implementation of CFS only utilizes Random Search and uses the top N percentiles scheme to define the promising subspace in each iteration, similar to the example shown in Chapter 6. However, you can edit the code based on your own preference since CFS is a very simple method with customizable modules.
The following code shows you how to perform CFS with the CoarseToFineSearchCV...