Árbol de decisión (DataSet)
-
Upload
norman-mayer -
Category
Documents
-
view
53 -
download
0
description
Transcript of Árbol de decisión (DataSet)
Árbol de decisiónÁrbol de decisión
(DataSet)(DataSet)
Outlook Temp Humidity Windy Class
sunny hot high false Don't Play
sunny hot high true Don't Play
overcast hot high false Play
rainy mild high false Play
rainy cool normal false Play
rainy cool normal true Don’t Play
overcast cool normal true Play
sunny mild high false Don’t Play
sunny cool normal false Play
rainy mild normal false Play
sunny mild normal true Play
overcast mild high true Play
overcast hot normal false Play
rainy mild high true Don’t Play
Árbol de decisiónÁrbol de decisión
(Fórmulas)(Fórmulas)
c
iii ppSEntropy
12log)(
)()(),()(
vAValoresv
S
S SEntropySEntropyASGain v
c
iS
S
S
S iiASmationSplitInfor1
2log),(
),(),(),( ASmationSplitInfor
ASGainASGainRatio
Mutual-info
Gain-ratio
Árbol de decisiónÁrbol de decisión
(Algoritmo)(Algoritmo)
Árbol de decisiónÁrbol de decisión
(Construcción – nivel1)(Construcción – nivel1)
94,0loglog
loglog
log])5,9([
145
2145
149
2149
'2'2
2
12'
tPlayDontPlayDonPlayPlay
iiitPlayDonPlay
pppp
ppEntropy
...)()()(94,0
)(])5,9([
)],5,9([
145
144
145
},,{'
'
rainyovercastsunny
rainyovercatsunnyvvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropySEntropy
SEntropyEntropy
OutlookGain
v
0,971loglog])3,2([)( 53
253
52
252
' tPlayDonPlaysunny EntropySEntropy
0loglog])0,4([)( 40
240
44
244
' tPlayDonPlayovercast EntropySEntropy
0,971loglog])2,3([)( 52
252
53
253
' tPlayDonPlayrainy EntropySEntropy
Árbol de decisiónÁrbol de decisión
(Construcción – nivel1)(Construcción – nivel1)
0,2470,97100,97194,0
)()()(94,0
...)],5,9([
145
144
145
145
144
145
'
rainyovercastsunny
tPlayDonPlay
SEntropySEntropySEntropy
OutlookGain
...)()()(94,0
)(])5,9([
)],5,9([
144
146
144
},,{'
'
coolmildhot
coolmildhotvvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropySEntropy
SEntropyEntropy
TempGain
v
1loglog])2,2([)( 42
242
42
242
' tPlayDonPlayhot EntropySEntropy
0,918loglog])2,4([)( 62
262
64
264
' tPlayDonPlaymild EntropySEntropy
0,811loglog])1,3([)( 41
241
43
243
' tPlayDonPlaycool EntropySEntropy
Árbol de decisiónÁrbol de decisión
(Construcción – nivel1)(Construcción – nivel1)
0,029811,0918,0194,0)],5,9([ 144
146
144
' TempGain tPlayDonPlay
...)()(94,0
)(])5,9([
)],5,9([
147
147
},{'
'
normalhigh
normalhighvvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropy
SEntropyEntropy
HumidityGain
v
0,985loglog])4,3([)( 74
274
73
273
' tPlayDonPlayhigh EntropySEntropy
0,592loglog])1,6([)( 71
271
76
276
' tPlayDonPlaynormal EntropySEntropy
0,151592,0985,094,0)],5,9([ 147
147
' HumidityGain tPlayDonPlay
Árbol de decisiónÁrbol de decisión
(Construcción – nivel1)(Construcción – nivel1)
...)()(94,0
)(])5,9([
)],5,9([
148
146
},{'
'
falsetrue
falsetruevvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropy
SEntropyEntropy
WindyGain
v
1loglog])3,3([)( 63
263
63
263
' tPlayDonPlaytrue EntropySEntropy
0,811loglog])2,6([)( 82
282
86
286
' tPlayDonPlayfalse EntropySEntropy
0,048811,0194,0)],5,9([ 148
146
' WindyGain tPlayDonPlay
Árbol de decisiónÁrbol de decisión
(Construcción – nivel1)(Construcción – nivel1)
0,048)],5,9([ ' WindyGain tPlayDonPlay
0,247)],5,9([ ' OutlookGain tPlayDonPlay
0,029)],5,9([ ' TempGain tPlayDonPlay
0,151)],5,9([ ' HumidityGain tPlayDonPlay
Outlook Temp Humidity Windy Class
sunny hot high false Don't Play
sunny hot high true Don't Play
sunny mild high false Don’t Play
sunny cool normal false Play
sunny mild normal true Play
Árbol de decisiónÁrbol de decisión
(Construcción – nivel2)(Construcción – nivel2)
0,971])3,2([ ' tPlayDonPlayEntropy
...)()()(971,0
)(])3,2([
)],3,2([
51
52
52
},,{'
'
coolmildhot
coolmildhotvvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropySEntropy
SEntropyEntropy
TempGain
v
0])2,0([)( ' tPlayDonPlayhot EntropySEntropy
1])1,1([)( ' tPlayDonPlaymild EntropySEntropy
0])0,1([)( ' tPlayDonPlaycool EntropySEntropy
Árbol de decisiónÁrbol de decisión
(Construcción – nivel2)(Construcción – nivel2)
0,57010971,0)],3,2([ 51
52
52
' TempGain tPlayDonPlay
...)()(971,0
)(])3,2([
)],3,2([
52
53
},{'
'
normalhigh
normalhighvvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropy
SEntropyEntropy
HumidityGain
v
0])3,0([)( ' tPlayDonPlayhigh EntropySEntropy
0])0,2([)( ' tPlayDonPlaynormal EntropySEntropy
Árbol de decisiónÁrbol de decisión
(Construcción – nivel2)(Construcción – nivel2)
971,000971,0)],3,2([ 52
53
' HumidityGain tPlayDonPlay
1])1,1([)( ' tPlayDonPlaytrue EntropySEntropy
0,918loglog])2,1([)( 32
232
31
231
' tPlayDonPlayfalse EntropySEntropy
...)()(971,0
)(])3,2([
)],3,2([
53
52
},{'
'
falsetrue
falsetruevvS
StPlayDonPlay
tPlayDonPlay
SEntropySEntropy
SEntropyEntropy
WindyGain
v
-0,018918,01971,0)],3,2([ 53
52
' WindyGain tPlayDonPlay
Árbol de decisiónÁrbol de decisión
(Construcción – nivel2)(Construcción – nivel2)
0,57)],3,2([ ' TempGain tPlayDonPlay
971,0)],3,2([ ' HumidityGain tPlayDonPlay
-0,018)],3,2([ ' WindyGain tPlayDonPlay
Árbol de decisiónÁrbol de decisión
(Construcción – nivel3)(Construcción – nivel3)
Outlook Temp Humidity Windy Class
sunny hot high false Don't Play
sunny hot high true Don't Play
sunny mild high false Don’t Play
Outlook Temp Humidity Windy Class
sunny cool normal false Play
sunny mild normal true Play
Árbol de decisiónÁrbol de decisión
(Construcción – nivel3)(Construcción – nivel3)
Outlook Temp Humidity Windy Class
overcast hot high false Play
overcast cool normal true Play
overcast mild high true Play
overcast hot normal false Play
Árbol de decisiónÁrbol de decisión
(Construcción – nivel2)(Construcción – nivel2)
Árbol de decisiónÁrbol de decisión
(Construcción – nivel2)(Construcción – nivel2)
Árbol de decisiónÁrbol de decisión
(Solución)(Solución)