Decision Tree
Decision Tree
Lesson 5
p p n n
Entropy( S )= −
p+n ( )
log 2
p+n
−
p+n
log 2 ( )
p+n
𝐼𝐺(𝐴1 ) = 𝐻 𝑆 − [𝑝 𝑆1 𝐻 𝑆1 + 𝑝 𝑆2 𝐻 𝑆2 ]
ID3
1. Calculate the entropy of the total dataset
2. Choose and attribute and Split the dataset by
an attribute
3. Calculate the entropy of each branch
4. Calculate Information Gain of the split