Introducing Hyperopt
All of the implemented optimization methods in the Hyperopt package assume we are working with a minimization problem. If your objective function is categorized as a maximization problem, for example, when you are using accuracy as the objective function score, you must add a negative sign to your objective function.
Utilizing the Hyperopt package to perform hyperparameter tuning is very simple. The following steps show how to perform any hyperparameter tuning methods provided in the Hyperopt package. More detailed steps, including the code implementation, will be given through various examples in the upcoming sections:
- Define the objective function to be minimized.
- Define the hyperparameter space.
- (Optional) Initiate the
Trials()object and pass it to thefmin()function. - Perform hyperparameter tuning by calling the
fmin()function. - Train the model on full training data using the best set of hyperparameters that have been found from...