From the course: Python: Working with Predictive Analytics

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Hyperparameter optimization

Challenge: Hyperparameter optimization - Python Tutorial

From the course: Python: Working with Predictive Analytics

Start my 1-month free trial

Challenge: Hyperparameter optimization

(bright music) - [Instructor] Now that you know about hyperparameter optimization, it's your turn, I have a challenge for you. In this challenge, I want you to first create a parameter grid for decision tree and random forest. Then, you will create the GridSearchCV with the grid created in step one. Finally, you will run the fit model and print out the best parameters and the test scores. To do this, remember to use the scikit-learn resource to look up your parameters. Finally, let me show you the begin file for this challenge. When you open the 210 begin, you will see that I have included the commanded out parameter grid with parameters. Let's scroll down to see that. So, here it is, starting on line 328. This isn't complete, so you will need to replace the asterisks with what you think should go there. Also, the GridSearch is provided on line 333. Good luck, and I'll meet you back at the solution video.

Contents