From the course: Supervised Learning Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
How to build a decision tree - Python Tutorial
From the course: Supervised Learning Essential Training
How to build a decision tree
- [Instructor] Let's learn how to build our tree from scratch. First, our algorithm selects the best attribute to split the record first. This is our root node. Then, we build the tree by repeating this process recursively for each child node until we reach a certain criterion. The most common criteria are that there are no more attributes or features to use these decision nodes, or the leftover values are in the same class, or there are no more samples or instances to sort. Before we get to building our decision tree, we want to prepare our data by checking for the criteria we need to make sure our tree works properly. First, we can confirm we're dealing with labeled data, or this would be an unsupervised learning course. Decision trees are fairly simple but prone overfitting. Despite being weak on their own, they can be combined giving birth to bagging or boosting models that are very powerful. There are two main…
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)
Identify common decision trees1m 55s
-
(Locked)
Splitting data and limiting decision tree depth3m 41s
-
(Locked)
How to build a decision tree2m 3s
-
(Locked)
Creating your first decision trees2m 49s
-
(Locked)
Analyzing decision tree performance5m 1s
-
(Locked)
Exploring how ensemble methods create strong learners1m 55s
-
(Locked)
-
-
-