iowa state universitycs573x/notes/cs573week3... · 2010-02-07 · 2 ! # department of computer...
TRANSCRIPT
1
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
2
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
11, 01,10, 00
11 10
01 00
1 0
c=A c=B
1 0
11 01
11 01
1 0
c=A c=B
10 00
10 00
c=A c=B
x 1 0 x
Tree 1 Tree 2 Data set
x
11, 01, 10, 00
y
Exa
mples
Class
3
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
C
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
4
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
5
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
6
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
7
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
8
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
9
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
P.
P , H
P ( )
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
10
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
11
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
P(X = H; Y = H) = 0.2. P(X= H; Y = T) = 0.4P(X = T; Y = H) = 0.3. P(X = T; Y = T) = 0.1H(X,Y)=-0.2log20.2+… 1.85P(X = H) = 0.6. H(X) 0.97P(Y = H) = 0.5. H(Y) = 1.0P(Y= H| X = H) = 0.2/0.6 = 0.333P(Y = T|X = H) = 1-0.333=0.667P(Y= H| X = T)= 0.3/0.4=0.75P(Y= T| X = T)=0.1/0.4=0.25 H(Y|X) 0.88
12
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
I(X,Y)=0?
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
13
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
S1
S2
SmS
Si Ci
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
14
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
I1 (t, d, l) +I2 (s, d, l) +I3 (t, b, l) -I4 (t, r, l) -I5 (s, b, l) -I6 (t, b, w) +I7 (t, d, w) +I8 (s, b, w) +
Height (tall, short)Hair (dark, blonde, red) Eye (blue, brown)
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
I1…I8
Height
I1 I3 I4 I6 I7 I2 I5 I8
t s
St Ss
Hair Hair
15
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Hair
rd
+ -Eye
b
wl
+
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
P (h) h
P (D) D
P (h | D) h D
P (D | h) D h
16
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
17
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
hMAP = argmaxh
iHP(D | hi )P(hi )
= argmaxh
iH
log2 P Dhi( ) + log2 P hi( )( )
= argminh
iH
log2 P Dhi( ) log2 P hi( )( )
log2 P hi( ) = description length of hi under optimal encoding
of hypotheses
-log2P(D | hi ) = description length of data D given hi under optimal encoding based on P(D | hi )
MAP hypothesis learning implies Occam's razor!
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
X,
D = {ei =(Xi , di)|Xi X di=c(Xi )}
D
VH,D
D
18
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
i.i.d. samples imply
P D | h( ) = P ei | h( )i
= P Xi,di h( )i
= P di h,Xi( )i
P Xi | h( )
Assuming Xi are independent of h,
P D | h( ) = P(dii
| h,Xi )P Xi( )
P(di | h,Xi ) =1 if h(Xi ) = di;
P(di | h,Xi ) = 0 otherwise
19
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
P D( ) = P(D | hh H
)P(h) =1H
h VH, D
P Xi( )i
+ 0
h VH, D
=VH ,D
HP Xi( )
i
h VH ,D, we have
P(h |D) =P Dh( )P h( )
P D( )=
P Xi( )i
H
H
VH ,D P Xi( )i
=
1VH ,D
and h VH ,D, we have P(h |D) = 0
H D
20
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
H
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
21
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
D
hi
h h
hi
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
H
22
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
H
H
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
23
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
24
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
25
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
26
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
27
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
28
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
•
•
•
29
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
30
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
31
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
EntropyRatio(S | A)Entropy(S | A)
SplitEntropy(S | A)
SplitEntropy(S | A)| Si || S |i=1
Values(A )log2
| Si || S |
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Entropy Impurity(Z) =ZiZi=1
Classeslog2
ZiZ
Gini Impurity(Z) =ZiZ
i j
Z j
Z
=1
ZiZ
2
i=1
Classes
32
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Impurity(S | A) = Min
i Values(A )Impurity Si( ){ }
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
•
•
•
•
•
w
ASGain
ACost 1
12
+
-
ACost
ASGain2
33
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Impurity(S) = ijij
SiS
S jS
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
•
•
•
•
34
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
•
•
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
•
•
•
35
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
•
•
•
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
36
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010
37
Department of Computer Science
Artificial Intelligence Research Laboratory
Copyright Vasant Honavar, 2010