The optimization procedure followed by the TPE method to find the combination of hyperparameter values that produce the best ML model performance is explained below:

The steps for the TPE method are as follows:

  1. Input: Optimization problem, hyperparameter search space

  2. Output: Optimal hyperparameters

  3. Initialize: Build surrogate models, Iteration counter

  4. While not terminated, do

    1. Apply the acquisition function.

    2. Select the next combination to evaluate.

    3. Evaluate the objective function.

    4. Update the surrogate models.

    5. Increment the iteration counter.

  5. end while

  6. Output: Optimal hyperparameters based on the surrogate models

1. Define the optimization problem

The initial step is to define the optimization problem, this is the objective function to be optimized and the hyperparameters to be fine-tuned. In this step, the objective function is usually a performance evaluation metric such as accuracy for classification problems or mean absolute error for regression problems. The aim of the optimization is to find the optimal hyperparameter values that maximize or minimize the objective function.

Get hands-on with 1400+ tech skills courses.