Académique Documents
Professionnel Documents
Culture Documents
Ex2 td1
Ex2 td1
Prenom Heni
Nom Saidani
licence LIRI3
Groupe A
ML-IA
EX1,2 TD1
EX :2
1)
2) Détailler les différents calculs des ratios de gain à chaque niveau de l’arbre
• Attribut «Type »
Info (Software) = - 3/6 log2 3/6 - 3/6 log2 3/6 = 1
Info (Hardware) = - 2/4 log2 2/4 - 2/4 log2 2/4 = 1
Info Type(T)= 6/10 Info (Software) + 4/10 Info (Hardware) = 1
Gain(T, Type) = Info(T)-Info Type (T) = 1 – 1 = 0
Gain Ratio(T, Concurrence) = 0
• Attribut «concurance »
Info(Non) = - 2/6 log2 2/6 - 4/6 log2 4/6 =0.528+0.39 = 0.917
Info(Oui) = - 3/4 log2 3/4 - 1/4 log2 1/4 = 0.3112 + 0.5 = 0.8112
Info Concurrence(T)= 6/10 Info (Non) + 4/10 Info (Oui) = 0.5502 + 0.32448 = 0.87468
Gain(T, concurrence) = Info(T)-InfoConcurrence(T) = 1 – 0.87468= 0.12532
Split Info(T,Concurrence) = - 6/10 log2 6/10- 4/10 log2 4/10 = 0.44 +0.52 = 0.96
Gain Ratio(T, Concurrence) = 0.12532/0.96 = 0.13
ML-IA
EX1,2 TD1
• Attribut « Age »
Info(T) = - 5/10 log2 5/10 - 5/10 log2 5/10 =1
Info(Agé) = - 3/3 log2 3/3 =0
Info(Moyen) = - 2/4 log2 2/4 - 2/4 log2 2/4 =1
Info(Récent) = - 3/3 log2 3/3 = 0
Info Age(T)= 3/10 Info (Agé) + 4/10 Info (Moyen) +3/10 Info (Récent) = 0.4
Gain(T, Age) = Info(T) – InfoAge(T) = 1 - 0.4= 0.6
Split Info(T, Age) = - 3/10 log2 3/10 - 4/10 log2 4/10 - 3/10 log2 3/10
Avec log(2)=0.301
Donc Split Info(T, Age)=0.52+0.52+0.52=1.56
Gain Ratio(T, Age) = 0.6/1.56 =0.3846
- Attribut Type
Info Type (N Hardware) = - 1/2 log2 1/2 - 1/2 log2 1/2 = 1
ML-IA
EX1,2 TD1
ML-IA