Decision Trees - 2022
Decision Trees - 2022
Example:
Mixed structure
Positive (1): ⅔ [10/15]
Negative (0): ⅓ [5/15]
The more mixed (1)s and (0)s in column, higher the entropy
Entropy
Goal: Find best attributes to split on when building a decision tree based on reduction in
entropy.
Keep splitting the variables/columns until mixed target column is no longer mixed.
Information gain
One of the other methods used in decision tree algorithms to decide optimal split
from a root node, and subsequent splits.
Causes
● Due to Presence of Noise
● Due to Lack of Representative Instances
Overfitting due to noise
Overfitting due to noise
Overfitting due to lack of samples
Identify overfitting
● Early stopping: stop growing tree earlier, before it reaches the point where it
perfectly classifies the training data. (depth goes beyond limit, IG insufficient)
● Post-pruning: allow the tree to overfit the data, and then post-prune the tree.
● Consider each of the decision nodes in the tree to be candidates for pruning.
● Pruning decision node: remove subtree rooted at that node, making it a leaf
node, and assign it most common classification of training examples affiliated with
that node.
● Nodes are removed only if the resulting pruned tree performs no worse than the
original over the validation set.
Temperature = 24.50C