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

Bagged trees using scikit-learn - scikit-learn Tutorial

From the course: Machine Learning with Scikit-Learn

Start my 1-month free trial

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…

Contents