From the course: Machine Learning with Scikit-Learn
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Bagged trees using scikit-learn - scikit-learn Tutorial
From the course: Machine Learning with Scikit-Learn
Bagged trees using scikit-learn
- [Instructor] Each machine learning algorithm has strengths and weaknesses. A weakness of decision trees is that they're prone over fitting on the training set. A way to mitigate this problem, is to constraint how large a tree can grow. Bagged trees try to overcome this weakness by using bootstrapped data, to grow multiple deep decision trees. The idea is that matrix protect each other from individual weaknesses. What this image shows is that multiple decision trees come together to make a combined prediction. In this video, I'll share with you how you can build a Bagged Tree Model. The first step is to Import Libraries. The Dataset used in this notebook is a housing prices for King County. The code below loads the dataset. The goal of this dataset is to predict house prices based on features like number of bedrooms and bathrooms. This notebook only selects a small subset of the features for simplicity. However, if…
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
-
(Locked)
How to format data for scikit-learn1m 55s
-
(Locked)
Linear regression using scikit-learn4m 32s
-
(Locked)
Train test split1m 53s
-
(Locked)
Logistic regression using scikit-learn3m 55s
-
(Locked)
Logistic regression for multiclass classification3m 36s
-
Decision trees using scikit-learn3m 9s
-
(Locked)
How to visualize decision trees using Matplotlib2m 5s
-
(Locked)
Bagged trees using scikit-learn2m
-
(Locked)
Random forests using scikit-learn2m 41s
-
(Locked)
Which machine learning model should you use?1m 23s
-
-
-