Exploring Decision Trees: Advantages, Algorithm, and Limitations

Rahul S
6 min readAug 16, 2023
src: Normalized Nerd

Decision trees are constructed using a series of binary decisions on the input features to predict the target variable.

A decision tree consists of a root node, internal nodes, and leaf nodes. The root node represents the entire dataset, and each internal node represents a decision based on one of the input features. The edges of the tree represent the possible outcomes of each decision, and the leaf nodes represent the predicted output.

A decision tree classification algorithm uses a training dataset to stratify or segment the predictor space into multiple regions. Each such region has only a subset of the training dataset.

To predict the outcome for a given (test) observation, first, we determine which of these regions it belongs to. Once its region is identified, its outcome class is predicted as being the same as the mode (most common) of the outcome classes of all the training observations that are included in that region.

Algorithm:

The algorithm works by recursively splitting the data into subsets based on the values of the input variables, with the goal of maximizing the information gain at each…

--

--