CommencerCommencer gratuitement

Iteratively tune multiple hyperparameters

In this exercise, you will build on the function you previously created to take in 2 hyperparameters, build a model and return the results. You will now use that to loop through some values and then extend this function and loop with another hyperparameter.

The function gbm_grid_search(learn_rate, max_depth) is available in this exercise.

If you need to remind yourself of the function you can run the function print_func() that has been created for you

Cet exercice fait partie du cours

Hyperparameter Tuning in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Create the relevant lists
results_list = ____
learn_rate_list = ____
max_depth_list = ____

# Create the for loop
for learn_rate in ____:
    for max_depth in ____:
        ____.append(gbm_grid_search(____,____))

# Print the results
print(____)   
Modifier et exécuter le code