Lec2 - Decision Trees Flashcards
What is Decision Tree Learning? Describe the Decision Tree algorithm.
Decision Tree Learning is a method for approximating discrete classification functions ny means of a tree-based representation.
Algorithm:
- Search for a split point (or attribute) using a statistical test for each attribute to determine how well it classifies the training examples when considered alone.
- Split the dataset according to the spit point.
- Repeat 1 and 2 on each of the created subsets.
Give the names of 3 statistical tests for Decision Tree Learning.
- Information Gain
- Gini Impurity
- Variance Reduction
What is Information Entropy? Give it’s formula.
Entropy is a measure of the uncertainty of a random variable.
E = -Sum_c[ y_c * log(y_c)]
where c = classes
Describe two different ways of splitting for Decision Tree Learning.
Ordered Values:
For each feature: start by sorting the values of the attribute, and then consider only split points that are between two examples in sorted order that have different classifications.
Symbolic Values:
Search for the most informative feature and then create as many branches as there are different values for that feature.
Compute the Information Gain for the following table and say which feature split would be the best.
H(Sunny) = 0.971
https://drive.google.com/open?id=1qkbSHoStEtFabV_3fpgmSeAm4LBgFQEE
Solution:
https://drive.google.com/open?id=1wteJEaM3xp0-MLoKsAdrljFgvZEWRCxO
What is overfitting, how can you deal with it, and what is a common way of dealing with it for decision trees?
Overfitting is when the estimated function learns to fit the training data perfectly, such that it is hard for it to generalise to unseen data.
To deal with it we can split our data to a training and validation set, use the training set for training and the validation set to measure performance, and stop when the error on it starts to increase.
Common approach with decision trees is to do pruning. Recursively go through nodes only connected to leaves and check if the accuracy would increase if that node was converted to a leaf node.