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

Creating your first decision trees - Python Tutorial

From the course: Supervised Learning Essential Training

Start my 1-month free trial

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…

Contents