SlideShare ist ein Scribd-Unternehmen logo
1 von 17
INTRODUCTION
TO
MACHINE
LEARNING
3RD EDITION
ETHEM ALPAYDIN
© The MIT Press, 2014
alpaydin@boun.edu.tr
http://www.cmpe.boun.edu.tr/~ethem/i2ml3e
Lecture Slides for
CHAPTER 3:
BAYESIAN DECISION
THEORY
Probability and Inference
3
 Result of tossing a coin is {Heads,Tails}
 Random var X {1,0}
Bernoulli: P {X=1} = po
X (1 ‒ po)(1 ‒ X)
 Sample: X = {xt }N
t =1
Estimation: po = # {Heads}/#{Tosses} = ∑t
xt / N
 Prediction of next toss:
Heads if po > ½, Tails otherwise
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:















otherwise
0
)
|
(
)
|
(
if
1
choose
or
otherwise
0
)
|
(
if
1
choose
C
C
C
C
,x
x
C
P
,x
x
C
P
.
,x
x
C
P
2
1
2
1
2
1
0
1
5
0
1
4
Bayes’ Rule
 
   
 
x
x
x
p
p
P
P
C
C
C
|
| 
   
         
    1
1
0
0
0
1
1
1
1
0














x
x
x
x
x
|
|
|
|
C
C
C
C
C
C
C
C
P
p
P
p
P
p
p
P
P
5
posterior
likelihood
prior
evidence
Bayes’ Rule: K>2 Classes
     
 
   
   




K
k
k
k
i
i
i
i
i
C
P
C
p
C
P
C
p
p
C
P
C
p
C
P
1
|
|
|
|
x
x
x
x
x
   
   
x
x |
max
|
if
choose
and
1
k
k
i
i
K
i
i
i
C
P
C
P
C
C
P
C
P


 

1
0
6
Losses and Risks
 Actions: αi
 Loss of αi when the state is Ck : λik
 Expected risk (Duda and Hart, 1973)
   
   
x
x
x
x
|
min
|
if
choose
|
|
k
k
i
i
k
K
k
ik
i
R
R
C
P
R






 
1
7
Losses and Risks: 0/1 Loss






k
i
k
i
ik
if
if
1
0

   
 
 
x
x
x
x
|
|
|
|
i
i
k
k
K
k
k
ik
i
C
P
C
P
C
P
R








1
1


8
For minimum risk, choose the most probable class
Losses and Risks: Reject
1
0
1
1
0










 


otherwise
if
if
,
K
i
k
i
ik
   
     
x
x
x
x
x
|
|
|
|
|
i
i
k
k
i
K
k
k
K
C
P
C
P
R
C
P
R










1
1
1




     
otherwise
reject
|
and
|
|
if
choose 




 1
x
x
x i
k
i
i C
P
i
k
C
P
C
P
C
9
Different Losses and Reject
10
Equal losses
Unequal losses
With reject
Discriminant Functions
  K
i
gi ,
,
, 
1

x
   
x
x k
k
i
i g
g
C max
if
choose 
   
 
x
x
x k
k
i
i g
g max
| 

R
 
 
 
   






i
i
i
i
i
C
P
C
p
C
P
R
g
|
|
|
x
x
x
x

11
K decision regions R1,...,RK
K=2 Classes
 Dichotomizer (K=2) vs Polychotomizer (K>2)
 g(x) = g1(x) – g2(x)
 Log odds:
 


 
otherwise
if
choose
2
1 0
C
g
C x
 
 
x
x
|
|
log
2
1
C
P
C
P
12
Utility Theory
 Prob of state k given exidence x: P (Sk|x)
 Utility of αi when state is k: Uik
 Expected utility:
   
   
x
x
x
x
|
max
|
if
Choose
|
|
j
j
i
i
k
k
ik
i
EU
EU
α
S
P
U
EU




 
13
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.
14
Association measures
15
 Support (X  Y):
 Confidence (X  Y):
 Lift (X  Y):
 
 
 
customers
and
bought
who
customers
#
#
,
Y
X
Y
X
P 
 
 
 
 
X
Y
X
X
P
Y
X
P
X
Y
P
bought
who
customers
and
bought
who
customers
|
#
#
)
(
,


 
)
(
)
|
(
)
(
)
(
,
Y
P
X
Y
P
Y
P
X
P
Y
X
P


Example
16
Apriori algorithm (Agrawal et al.,
1996)
17
 For (X,Y,Z), a 3-item set, to be frequent (have
enough support), (X,Y), (X,Z), and (Y,Z) should
be frequent.
 If (X,Y) is not frequent, none of its supersets
can be frequent.
 Once we find the frequent k-item sets, we
convert them to rules: X, Y  Z, ...
and X  Y, Z, ...

Weitere ähnliche Inhalte

Ähnlich wie i2ml3e-chap3.pptx

Ch 56669 Slides.doc.2234322344443222222344
Ch 56669 Slides.doc.2234322344443222222344Ch 56669 Slides.doc.2234322344443222222344
Ch 56669 Slides.doc.2234322344443222222344
ohenebabismark508
 
Information-theoretic clustering with applications
Information-theoretic clustering  with applicationsInformation-theoretic clustering  with applications
Information-theoretic clustering with applications
Frank Nielsen
 
CPSC531-Probability.pptx
CPSC531-Probability.pptxCPSC531-Probability.pptx
CPSC531-Probability.pptx
RidaIrfan10
 
Regret Minimization in Multi-objective Submodular Function Maximization
Regret Minimization in Multi-objective Submodular Function MaximizationRegret Minimization in Multi-objective Submodular Function Maximization
Regret Minimization in Multi-objective Submodular Function Maximization
Tasuku Soma
 
2012 mdsp pr07 bayes decision
2012 mdsp pr07 bayes decision2012 mdsp pr07 bayes decision
2012 mdsp pr07 bayes decision
nozomuhamada
 

Ähnlich wie i2ml3e-chap3.pptx (20)

Role of Bellman's Equation in Reinforcement Learning
Role of Bellman's Equation in Reinforcement LearningRole of Bellman's Equation in Reinforcement Learning
Role of Bellman's Equation in Reinforcement Learning
 
Lecture9 xing
Lecture9 xingLecture9 xing
Lecture9 xing
 
Ch 56669 Slides.doc.2234322344443222222344
Ch 56669 Slides.doc.2234322344443222222344Ch 56669 Slides.doc.2234322344443222222344
Ch 56669 Slides.doc.2234322344443222222344
 
Inria Tech Talk - La classification de données complexes avec MASSICCC
Inria Tech Talk - La classification de données complexes avec MASSICCCInria Tech Talk - La classification de données complexes avec MASSICCC
Inria Tech Talk - La classification de données complexes avec MASSICCC
 
Bayesian Subset Simulation
Bayesian Subset SimulationBayesian Subset Simulation
Bayesian Subset Simulation
 
Information-theoretic clustering with applications
Information-theoretic clustering  with applicationsInformation-theoretic clustering  with applications
Information-theoretic clustering with applications
 
Bayesian decesion theory
Bayesian decesion theoryBayesian decesion theory
Bayesian decesion theory
 
CPSC531-Probability.pptx
CPSC531-Probability.pptxCPSC531-Probability.pptx
CPSC531-Probability.pptx
 
Introduction to logistic regression
Introduction to logistic regressionIntroduction to logistic regression
Introduction to logistic regression
 
Accelerating Metropolis Hastings with Lightweight Inference Compilation
Accelerating Metropolis Hastings with Lightweight Inference CompilationAccelerating Metropolis Hastings with Lightweight Inference Compilation
Accelerating Metropolis Hastings with Lightweight Inference Compilation
 
Chapter 6 Probability
Chapter 6  ProbabilityChapter 6  Probability
Chapter 6 Probability
 
Universal Prediction without assuming either Discrete or Continuous
Universal Prediction without assuming either Discrete or ContinuousUniversal Prediction without assuming either Discrete or Continuous
Universal Prediction without assuming either Discrete or Continuous
 
CS571: Language Models
CS571: Language ModelsCS571: Language Models
CS571: Language Models
 
Regret Minimization in Multi-objective Submodular Function Maximization
Regret Minimization in Multi-objective Submodular Function MaximizationRegret Minimization in Multi-objective Submodular Function Maximization
Regret Minimization in Multi-objective Submodular Function Maximization
 
2012 mdsp pr07 bayes decision
2012 mdsp pr07 bayes decision2012 mdsp pr07 bayes decision
2012 mdsp pr07 bayes decision
 
Low Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse ProblemsLow Complexity Regularization of Inverse Problems
Low Complexity Regularization of Inverse Problems
 
Probability cheatsheet
Probability cheatsheetProbability cheatsheet
Probability cheatsheet
 
Tree models with Scikit-Learn: Great models with little assumptions
Tree models with Scikit-Learn: Great models with little assumptionsTree models with Scikit-Learn: Great models with little assumptions
Tree models with Scikit-Learn: Great models with little assumptions
 
MLHEP 2015: Introductory Lecture #4
MLHEP 2015: Introductory Lecture #4MLHEP 2015: Introductory Lecture #4
MLHEP 2015: Introductory Lecture #4
 
On learning statistical mixtures maximizing the complete likelihood
On learning statistical mixtures maximizing the complete likelihoodOn learning statistical mixtures maximizing the complete likelihood
On learning statistical mixtures maximizing the complete likelihood
 

Kürzlich hochgeladen

Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 

Kürzlich hochgeladen (20)

Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptx
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 

i2ml3e-chap3.pptx

  • 1. INTRODUCTION TO MACHINE LEARNING 3RD EDITION ETHEM ALPAYDIN © The MIT Press, 2014 alpaydin@boun.edu.tr http://www.cmpe.boun.edu.tr/~ethem/i2ml3e Lecture Slides for
  • 3. Probability and Inference 3  Result of tossing a coin is {Heads,Tails}  Random var X {1,0} Bernoulli: P {X=1} = po X (1 ‒ po)(1 ‒ X)  Sample: X = {xt }N t =1 Estimation: po = # {Heads}/#{Tosses} = ∑t xt / N  Prediction of next toss: Heads if po > ½, Tails otherwise
  • 4. 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:                otherwise 0 ) | ( ) | ( if 1 choose or otherwise 0 ) | ( if 1 choose C C C C ,x x C P ,x x C P . ,x x C P 2 1 2 1 2 1 0 1 5 0 1 4
  • 5. Bayes’ Rule         x x x p p P P C C C | |                    1 1 0 0 0 1 1 1 1 0               x x x x x | | | | C C C C C C C C P p P p P p p P P 5 posterior likelihood prior evidence
  • 6. Bayes’ Rule: K>2 Classes                     K k k k i i i i i C P C p C P C p p C P C p C P 1 | | | | x x x x x         x x | max | if choose and 1 k k i i K i i i C P C P C C P C P      1 0 6
  • 7. Losses and Risks  Actions: αi  Loss of αi when the state is Ck : λik  Expected risk (Duda and Hart, 1973)         x x x x | min | if choose | | k k i i k K k ik i R R C P R         1 7
  • 8. Losses and Risks: 0/1 Loss       k i k i ik if if 1 0          x x x x | | | | i i k k K k k ik i C P C P C P R         1 1   8 For minimum risk, choose the most probable class
  • 9. Losses and Risks: Reject 1 0 1 1 0               otherwise if if , K i k i ik           x x x x x | | | | | i i k k i K k k K C P C P R C P R           1 1 1           otherwise reject | and | | if choose       1 x x x i k i i C P i k C P C P C 9
  • 10. Different Losses and Reject 10 Equal losses Unequal losses With reject
  • 11. Discriminant Functions   K i gi , , ,  1  x     x x k k i i g g C max if choose        x x x k k i i g g max |   R                 i i i i i C P C p C P R g | | | x x x x  11 K decision regions R1,...,RK
  • 12. K=2 Classes  Dichotomizer (K=2) vs Polychotomizer (K>2)  g(x) = g1(x) – g2(x)  Log odds:       otherwise if choose 2 1 0 C g C x     x x | | log 2 1 C P C P 12
  • 13. Utility Theory  Prob of state k given exidence x: P (Sk|x)  Utility of αi when state is k: Uik  Expected utility:         x x x x | max | if Choose | | j j i i k k ik i EU EU α S P U EU       13
  • 14. 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. 14
  • 15. Association measures 15  Support (X  Y):  Confidence (X  Y):  Lift (X  Y):       customers and bought who customers # # , Y X Y X P          X Y X X P Y X P X Y P bought who customers and bought who customers | # # ) ( ,     ) ( ) | ( ) ( ) ( , Y P X Y P Y P X P Y X P  
  • 17. Apriori algorithm (Agrawal et al., 1996) 17  For (X,Y,Z), a 3-item set, to be frequent (have enough support), (X,Y), (X,Z), and (Y,Z) should be frequent.  If (X,Y) is not frequent, none of its supersets can be frequent.  Once we find the frequent k-item sets, we convert them to rules: X, Y  Z, ... and X  Y, Z, ...