Académique Documents
Professionnel Documents
Culture Documents
INTRODUCTION TO
Machine Learning
2nd Edition
ETHEM ALPAYDIN
The MIT Press, 2010
alpaydin@boun.edu.tr
http://www.cmpe.boun.edu.tr/~ethem/i2ml2e
CHAPTER 3:
Bayesian Decision
Theory
Classification
Example: Credit
scoring
Differentiating
between low-risk
and high-risk
customers from
their income and
savings
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
Estimation: po = # {Heads}/#{Tosses} = t
xt / N
Prediction of next toss:
Heads if po > , Tails otherwise
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
Classification
Credit scoring: Inputs are income and
savings.
Output is low-risk vs high-risk
Input: x = [x1,x2]T ,Output: C ( {0,1} )
Prediction: C 1 if P (C 1|x ,x ) 0.5
1
2
choose
C 0 otherwise
or
C 1 if P (C 1|x1 ,x2 ) P (C 0|x1 ,x2 )
choose
C 0 otherwise
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
5
Press (V1.0)
Bayes Rule
prior
posterior
likelihood
P C p x | C
P C | x
p x
evidence
P C 0 P C 1 1
p x p x | C 1 P C 1 p x | C 0 P C 0
p C 0| x P C 1| x 1
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
P Ci 0 and P Ci 1
i 1
choose Ci if P Ci | x max k P Ck | x
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
input)
Loss : ik ( kesalahan memilih Ci jika kls
sebenarnya Ck ) K
R i | x ikP Ck | x
Resiko melakukan
k1 aksi i (Duda and Hart,
choose i if R i | x min kR k | x
1973)
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
9
Press (V1.0)
R i | x ikP Ck | x
k1
P Ck | x
k i
1 P Ci | x
For minimum risk, choose the most probable class
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
10
ik if i K 1 , 0 1
1 otherwise
Resiko reject
K
R K 1|x P Ck |x
k 1
R i |x P Ck |x 1 P Ci |x
k i
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
11
Press (V1.0)
if R ( K 1 | x) R( i | x), i 1, 2,..., K 1
atau
choose Ci if P Ci | x P Ck | x k i and P Ci | x 1
reject
otherwise
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT Press
(V1.0)
12
Discriminant Functions
choose Ci if gi x max kgk x
gi x , i 1, ,K
R i | x
gi x P Ci | x
p x | C P C
i
i
R i x | gi x maxkgk x
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
13
Press (V1.0)
K=2 Classes
Dichotomizer (K=2) vs Polychotomizer
(K>2)
g(x) = g1(x) g C
2(x)
1 if g x 0
choose
C2 otherwise
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
14
Press (V1.0)
Utility Theory
Melakukan keputusan yang rasional ketika
tidak yakin
dengan keadaan yg sebenarnya (state)
Prob of state k given exidence x: P (Sk|x)
Fungsi utility Uik ( seberapa baik
Choose i if EU i | x max EU j | x
j
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
15
Press (V1.0)
Association Rules
Association rule: X Y
People who buy/click/visit/enjoy X are also
likely to buy/click/visit/enjoy Y.
A rule implies association, not necessarily
causation.
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
16
Press (V1.0)
Association measures
Support (X Y):
# customers who bought X and Y
P X,Y
# customers
Confidence (X Y):
P X,Y
P Y | X
P(X)
# customers who bought X and Y
P X,Y P(Y| X)
P(for
X)EPAlpaydn
(Y) 2010P(Introduction
Y)
Lecture Notes
to Machine Learning 2e The MIT
Press (V1.0)
17
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
18
P C1 | x
Log odds:
log
P C2 | x
Lecture Notes for E Alpaydn 2010 Introduction to Machine Learning 2e The MIT
Press (V1.0)
19
A1 , A2 ,..., Ak
Jika kejadian-kejadian
adalah partisi dari ruang sampel S maka
untuk kejadian B sembarang dari S
sedemikian sehingga
berlaku:
P
( B Ai ).P ( Ai )
P ( Ai P(B)>0
B)
P ( Ai B )
k
P( B)
P( B Ai ).P( Ai )
i 1
20