Lesson 2 of 6 8 min · 102 words
Entropy
Measuring how mixed the classes in a node are.
Entropy measures how mixed the classes in a node are:
where is the fraction of examples in class . A pure node (all one class) has . For two classes, a 50/50 node has the maximum bit. With classes, the maximum is .
An alternative impurity measure is the Gini impurity, (used by CART). It behaves very similarly and is slightly faster to compute.
Formula to remember
Information gain
Entropy reduction from splitting on A.
Quick check · +5 XP