Vous êtes sur la page 1sur 4

EX1,2 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

Age Concurrence Type Profit Age Concurrence Type Profit


Moyen Oui Hardware Baisse Agé Non Software Baisse
Moyen Oui Software Baisse Agé Oui Software Baisse
Moyen Non Hardware Hausse Agé Non Hardware Baisse
Moyen Non Software Hausse
Age Concurrence Type Profit
Récent Non Hardware Hausse
Récent Non Software Hausse
Récent Oui Software Hausse

• Info(T Agé) = Info(S) = - 3/3 log2 3/3 = 0 → condition d’arrêts


• Info(T Récent) = Info(B) = - 3/3 log2 3/3 = 0 → condition d’arrêts
• Info(T Moyen) = Info(N) = - 2/4 log2 2/4 - 2/4 log2 2/4 = 1
- Attribut Concurrence
Info Concurrence (N Non)= - 2/2 log2 2/2 = 0
Info Concurrence (N Oui)= - 2/2 log2 2/2 = 0
➔ Condition d’arrêt

- Attribut Type
Info Type (N Hardware) = - 1/2 log2 1/2 - 1/2 log2 1/2 = 1
ML-IA
EX1,2 TD1

Info Type (N Software) = - 1/2 log2 1/2 - 1/2 log2 1/2 = 1


Info Type (N)= ((2/4) * 1) + ((2/4) * 1 ) = 1
Gain(N, Type) = 1 – 1 = 0
Gain Ratio(N, Age) = 0

Donc on va schématiser cette arbre de décisions


.

ML-IA

Vous aimerez peut-être aussi