Decision tree

Decision tree is another supervised ML algorithm that can be used for classification and regression problems. Before discussing random forest, which is heavily related to decision trees, it is crucial to understand how a decision tree works. A decision tree splits the data into subtrees which are then split into other subtrees. As illustrated in Fig. 5.38, a root node is at the topmost level which essentially represents the entire population, a decision node also referred to as an internal node has two or more branches, and finally, a terminal node also referred to as a leaf node is the lowest node and does not split any longer. Note that the term splitting is defined as splitting a node into two or more subnodes.
Figure 5.38 Decision ...

Get Machine Learning Guide for Oil and Gas Using Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.