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.
Solution: Hyperparameter optimization - Python Tutorial
From the course: Python: Working with Predictive Analytics
Solution: Hyperparameter optimization
(funky music) - [Instructor] Here is how I solved the hyperparameter optimization challenge. First, let's open the solution begin file and scroll down. First, let's look at decision tree. We will start by uncommenting the parameter grid section So for that, I'm selecting four lines, starting from 328, right-click, and select Uncomment. We will create the parameter grid for decision tree. So let's start replacing the asterisks with the values. Minimum samples leaf is the minimum number of samples required to be at the leaf node. So I will add values between nine through 13 with step size of one. So let's start doing that. It will be equal to np.arrange. Nine through 13 with the step size of one. And integer means it's an integer. If integer was not given, it would infer the data type from the other input arguments. I could've also typed it as "9, 10, 11, 12" but suppose we are giving it a larger range in the future that we don't want to type each and every element. So we can use this…
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)
-