Reputation: 185
Usually, we discuss attribute selection in ID3 with the highest information gain based on assumption that there are two classes: positive class and negative class. However, I just meet a problem where there are three classes. How to apply attribute selection algorithm for the case of three classes?
Upvotes: 1
Views: 440
Reputation: 185
For convenience many books only discuss the calculation of I(p,n). If there are more than 2 classes, we can calculate I(c1,...,cn)=-C1*logC1-C2*logC2... while C1 is the proportion of elements of class 1.
Upvotes: 1