From the course: Machine Learning with Scikit-Learn
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Random forests using scikit-learn - scikit-learn Tutorial
From the course: Machine Learning with Scikit-Learn
Random forests using scikit-learn
- [Instructor] Each machine learning algorithm has strengths and weaknesses. Bagged tree models use many trees to protect individual decision trees from overfitting. However, bagged tree models are not without weaknesses. Suppose you have one very strong feature in a data set, most of the trees will use that feature as the top split. This will result in many similar trees. You can think of random forest as a variant of a bagged tree model. The difference is that each time a split's considered, only a portion of the total number of features are split candidates. In short, random forests make the individual decision trees less correlated In this video, I'll share with you how you can build a random forest model using Scikit-Learn. The first step is to import libraries. The next step is to load a dataset. This dataset contains house sale prices for King County. The code below loads the dataset. The goal of this dataset is to…
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
-
-
-
-
What is supervised learning?54s
-
How to format data for scikit-learn1m 55s
-
Linear regression using scikit-learn4m 32s
-
Train test split1m 53s
-
Logistic regression using scikit-learn3m 55s
-
Logistic regression for multiclass classification3m 36s
-
Decision trees using scikit-learn3m 9s
-
How to visualize decision trees using Matplotlib2m 5s
-
Bagged trees using scikit-learn2m
-
Random forests using scikit-learn2m 41s
-
Which machine learning model should you use?1m 23s
-
-
-