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 - Python Tutorial
From the course: Python: Working with Predictive Analytics
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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Introduction to predictive models2m 52s
-
(Locked)
Linear regression6m 25s
-
(Locked)
Polynomial regression4m 37s
-
(Locked)
Support Vector Regression (SVR)4m 8s
-
(Locked)
Decision tree regression5m 43s
-
(Locked)
Random forest regression4m 44s
-
(Locked)
Evaluation of predictive models2m 56s
-
(Locked)
Hyperparameter optimization5m 4s
-
(Locked)
Challenge: Hyperparameter optimization1m 15s
-
(Locked)
Solution: Hyperparameter optimization6m 55s
-
(Locked)
-