-
Book Overview & Buying
-
Table Of Contents
Hands-On Artificial Intelligence for IoT - Second Edition
By :
In this section, you’ll learn about another ML algorithm that’s very popular and fast—decision trees. In decision trees, we build a tree-like structure of decisions; we start with the root, choose a feature, split into branches, and continue until we reach the leaves, which represent the predicted class or value. The algorithm of decision trees involves two main steps:
Let’s understand it with an example. Consider a sample of forty students. We have three variables: gender (boy or girl; discrete), class (XI or XII; discrete), and height (five to six feet; continuous). Eighteen students prefer to go to the library in their spare time and the rest prefer to play. We can build a decision tree to predict who will be going to the library and who will be going to the playground in their leisure time. To build the decision tree, we’...