From the course: NLP with Python for Machine Learning Essential Training
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Random forest model with grid search - Python Tutorial
From the course: NLP with Python for Machine Learning Essential Training
Random forest model with grid search
- [Instructor] This lesson is going to build on what we learned in the last lesson, but we'll introduce a new concept, called grid-search. In the last lesson, we fit just a single model with a single set of hyperparameter settings, and then we generated a single set of evaluation metrics. But aren't you a little curious to see if we can maybe make our model better, simply by changing the hyperparameter settings, like the number of estimators, or the max depth? We mentioned the last model wasn't quite aggressive enough. Could we capture more spam by altering the hyperparameter settings? That's where grid-search comes in. Grid-search basically means defining a grid of hyperparameter settings, and then exploring a model fit with each combination of those hyperparameter settings. So in our case, that means setting a range of number of estimators, and a range of max depth, that you'd like to explore. And then grid-search will test every combination of those, and fit a model and evaluate…
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)
What is machine learning?4m 2s
-
(Locked)
Cross-validation and evaluation metrics7m 48s
-
(Locked)
Introducing random forest3m 4s
-
(Locked)
Building a random forest model8m 11s
-
(Locked)
Random forest with holdout test set12m 2s
-
(Locked)
Random forest model with grid search8m 48s
-
(Locked)
Evaluate random forest model performance8m 44s
-
(Locked)
Introducing gradient boosting4m 13s
-
(Locked)
Gradient-boosting grid search9m 44s
-
(Locked)
Evaluate gradient-boosting model performance9m 32s
-
(Locked)
Model selection: Data prep8m 25s
-
(Locked)
Model selection: Results9m 52s
-
(Locked)
-