Aan de slagGa gratis aan de slag

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

Deze oefening maakt deel uit van de cursus

Hyperparameter Tuning in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# 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(____)   
Code bewerken en uitvoeren