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.
Creating your first decision trees - Python Tutorial
From the course: Supervised Learning Essential Training
Creating your first decision trees
- [Instructor] All right. I'm in exercise file 03, 04 BEGIN. To build our decision tree classifier, we'll use a scalar, a popular Python library. First, let's load in our dataset. And we're going to stock this as well, and just have a look at the beginning first. We can see here we've got a couple of different features, like the temperature, humidity, all the way down to our response variable occupancy at the end. This is a zero if the room is unoccupied and a one if it's occupied. Let's go ahead and print the tail of this dataset. And thankfully it doesn't look like we're missing a lot of values at the end. We can go on to using room.describe, to understand these statistics better. We can now see the ranges for each of these variables. Our temperature looks like it's in Celsius as it goes between 19 and 24. We also have the ranges for our variables. Humidity, light, CO2 and humidity ratio. One thing to note is that our…
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)
-
-
-