Beruflich Dokumente
Kultur Dokumente
Group Members
Information Gain
Dataset entropy
Attribute entropy
Gain
Attribute Selection: Information Gain
age income student credit_rating buys_computer
<=30 high no fair no
<=30 high no excellent no 5 4
31…40 high no fair yes Info age ( D) I (2,3) I (4,0)
>40 medium no fair yes 14 14
>40 low yes fair yes
>40 low yes excellent no 5
31…40 low yes excellent yes I (3,2) 0.694
<=30 medium no fair no 14
<=30 low yes fair yes
>40 medium yes fair yes 5
<=30 medium yes excellent yes I (2,3) means “age <=30” has 5
31…40 medium no excellent yes 14
31…40 high yes fair yes out of 14 samples, with 2 yes’es
>40 medium no excellent no
and 3 no’s. Hence
g Class P: buys_computer =
“yes” Gain(age) Info ( D) Info age ( D) 0.246
g Class N: buys_computer =
9 9 5 5 Similarly,
D) I (9,5) log 2 ( ) log 2 ( ) 0.940
Info (“no”
14 14 14 14