SlideShare a Scribd company logo
1 of 11
Download to read offline
Naïve Bayes Classifiers
Dae-Ki Kang
Probability
• What is the probability that you get hit in the
head with bird droppings when you go outside?
▫ Initially shown in one episode of Korea TV show
▫ Asked in one BBS of an elite group in Korea
 no one gave the right answer
• It is difficult to define “probability”
▫ As difficult as defining “science”, “history”, etc.
• 16 different definitions
• Frequentist vs. Bayesian
Bayesian Probability
• Can assign probability on any statement
• Can be used to show the degree of one’s belief, or
degree of one’s knowledge.
• Example of subjectiveness: Alice, Bob, and Carol
▫ Alice tosses a new coin 10 times  3/10 heads
▫ Bob tosses the coin 10 times  4/10 heads
▫ Carol has watched them all  7/20 heads
• Probabilities in Monty Hall
▫ MC knows where the car is  1
▫ Guest asked again after MC opened the door  2/3
▫ Viewer started watching the show after MC opened the
door  1/2
Bayes Theorem
• Probability – P(A)
• Conditional Probability – P(A|C)
• P(A|B) = P(A,B)/P(B)
• P(B|A) = P(A,B)/P(A)
• P(A|B) = {P(B|A)P(A)}/P(B)
• P(C|D) = {P(D|C)P(C)}/P(D)
▫ P(C|D) : The probability of class given data (Posterior
Probability)
▫ P(C) : Prior Probability
▫ P(D|C) : Likelihood
▫ P(D) : constant, so ignored
Does patient have cancer or not?
• A patient takes a lab test and the result comes back positive. It
is known that the test returns a correct positive result in only
99% of the cases and a correct negative result in only 95% of t
he cases. Furthermore, only 0.03 of the entire population has
this disease.
1. What is the probability that this patient has cancer?
2. What is the probability that he does not have cancer?
3. What is the diagnosis?
Bayes Classifier
• Recall P(C|X1,X2,…Xn) =
P(C)P(X1,X2,…Xn|C)/P(X1,X2,…Xn)
•  P(C|X1,X2,…Xn) α P(C)P(X1,X2,…Xn|C)
• Maximum A Posteriori hypothesis
▫ hMAP = argmax P(D|h)P(h)
• Maximum Likelihood hypothesis
▫ hML = argmax P(D|h)
Naïve Bayes Classifier
• Recall P(C|X1,X2,…Xn) =
P(C)P(X1,X2,…Xn|C)/P(X1,X2,…Xn)
•  P(C|X1,X2,…Xn) α P(C)P(X1,X2,…Xn|C)
• It is hard to calculate joint probabilities
▫ Too many cases
▫ Too little data
• If we ignore the dependences among X1,X2,…Xn?
▫ Why? Because we are naïve.
▫ More precisely, suppose X1,X2,…Xn are conditionally
independent of each other given C
• P(C|X1,X2,…Xn) α P(C) * Π P(Xi|C)
Question: For the day <sunny, cool, high, strong>, what’s
the play prediction?
Wind
Humidity
Temp
Outlook
PlayP(Play=Y) 9/14
P(Play=N) 4/14
P(Sunny|P) P(Overcast|P) P(Rain|P)
Play=
Y
2/9 4/9 3/9
Play=
N
3/5 0/5 2/5
P(Hot|P) P(Mild|P) P(Cool|P)
Play=
Y
2/9 4/9 3/9
Play=
N
2/5 2/5 1/5
Zero Occurrence
• When a feature is never occurred in the training
set  zero frequency  PANIC: makes all terms
zero
• Smoothing the distribution
▫ Laplacian Smoothing
▫ Dirichlet Priors Smoothing
▫ and many more (Absolute Discouting, Jelinek-
Mercer smoothing, Katz smoothing, Good-Turing
smoothing, etc.)
Extension of NBC
• NBC is actually very effective
• Selective Bayesian Classifiers (SBC)
• Tree Augmented Naïve Bayes (TAN)
▫ ChowLiu algorithm (CL-TAN)
▫ SuperParent algorithm (SP-TAN)
• Attribute Value Taxonomy Guided Naïve Bayes
Learner (AVT-NBL)
• n-gram Augmented Naïve Bayes

More Related Content

What's hot

Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theoremimran iqbal
 
Probability & Bayesian Theorem
Probability & Bayesian TheoremProbability & Bayesian Theorem
Probability & Bayesian TheoremAzmi Mohd Tamil
 
An introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using PythonAn introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using Pythonfreshdatabos
 
Introduction of Probability
Introduction of ProbabilityIntroduction of Probability
Introduction of Probabilityrey castro
 
Pre-Cal 40S Slides May 17, 2007
Pre-Cal 40S Slides May 17, 2007Pre-Cal 40S Slides May 17, 2007
Pre-Cal 40S Slides May 17, 2007Darren Kuropatwa
 
Complements conditional probability bayes theorem
Complements  conditional probability bayes theorem  Complements  conditional probability bayes theorem
Complements conditional probability bayes theorem Long Beach City College
 
Formulas of Probability :Class 12 maths
Formulas of Probability :Class 12 mathsFormulas of Probability :Class 12 maths
Formulas of Probability :Class 12 mathssumanmathews
 
Probability By Ms Aarti
Probability By Ms AartiProbability By Ms Aarti
Probability By Ms Aartikulachihansraj
 
1616 probability-the foundation of probability theory
1616 probability-the foundation of probability theory1616 probability-the foundation of probability theory
1616 probability-the foundation of probability theoryDr Fereidoun Dejahang
 
Probability basics and bayes' theorem
Probability basics and bayes' theoremProbability basics and bayes' theorem
Probability basics and bayes' theoremBalaji P
 
Conditional probability, and probability trees
Conditional probability, and probability treesConditional probability, and probability trees
Conditional probability, and probability treesGlobal Polis
 

What's hot (20)

Probability
ProbabilityProbability
Probability
 
Probability[1]
Probability[1]Probability[1]
Probability[1]
 
Bayes theorem
Bayes theoremBayes theorem
Bayes theorem
 
Nossi ch 10
Nossi ch 10Nossi ch 10
Nossi ch 10
 
Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theorem
 
Probability & Bayesian Theorem
Probability & Bayesian TheoremProbability & Bayesian Theorem
Probability & Bayesian Theorem
 
Probability Concepts
Probability ConceptsProbability Concepts
Probability Concepts
 
Pre-Cal 40S June 1, 2009
Pre-Cal 40S June 1, 2009Pre-Cal 40S June 1, 2009
Pre-Cal 40S June 1, 2009
 
An introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using PythonAn introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using Python
 
Lecture on Statistics 1
Lecture on Statistics 1Lecture on Statistics 1
Lecture on Statistics 1
 
Counting
Counting  Counting
Counting
 
Introduction of Probability
Introduction of ProbabilityIntroduction of Probability
Introduction of Probability
 
Pre-Cal 40S Slides May 17, 2007
Pre-Cal 40S Slides May 17, 2007Pre-Cal 40S Slides May 17, 2007
Pre-Cal 40S Slides May 17, 2007
 
Complements conditional probability bayes theorem
Complements  conditional probability bayes theorem  Complements  conditional probability bayes theorem
Complements conditional probability bayes theorem
 
Formulas of Probability :Class 12 maths
Formulas of Probability :Class 12 mathsFormulas of Probability :Class 12 maths
Formulas of Probability :Class 12 maths
 
Probability By Ms Aarti
Probability By Ms AartiProbability By Ms Aarti
Probability By Ms Aarti
 
1616 probability-the foundation of probability theory
1616 probability-the foundation of probability theory1616 probability-the foundation of probability theory
1616 probability-the foundation of probability theory
 
Probability basics and bayes' theorem
Probability basics and bayes' theoremProbability basics and bayes' theorem
Probability basics and bayes' theorem
 
Probability
ProbabilityProbability
Probability
 
Conditional probability, and probability trees
Conditional probability, and probability treesConditional probability, and probability trees
Conditional probability, and probability trees
 

Viewers also liked

An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier ananth
 
Naive bayes
Naive bayesNaive bayes
Naive bayesabaldove
 
Dwdm naive bayes_ankit_gadgil_027
Dwdm naive bayes_ankit_gadgil_027Dwdm naive bayes_ankit_gadgil_027
Dwdm naive bayes_ankit_gadgil_027ankitgadgil
 

Viewers also liked (6)

Lecture10 - Naïve Bayes
Lecture10 - Naïve BayesLecture10 - Naïve Bayes
Lecture10 - Naïve Bayes
 
An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Dwdm naive bayes_ankit_gadgil_027
Dwdm naive bayes_ankit_gadgil_027Dwdm naive bayes_ankit_gadgil_027
Dwdm naive bayes_ankit_gadgil_027
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Naive Bayes Presentation
Naive Bayes PresentationNaive Bayes Presentation
Naive Bayes Presentation
 

Similar to 2013-1 Machine Learning Lecture 03 - Naïve Bayes Classifiers

Similar to 2013-1 Machine Learning Lecture 03 - Naïve Bayes Classifiers (20)

Discrete PDs(1).pdf
Discrete PDs(1).pdfDiscrete PDs(1).pdf
Discrete PDs(1).pdf
 
2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx
 
Probability 23321
Probability 23321Probability 23321
Probability 23321
 
Probability 23321
Probability 23321Probability 23321
Probability 23321
 
Probability
ProbabilityProbability
Probability
 
Probablity
ProbablityProbablity
Probablity
 
Bayes NIPT
Bayes NIPTBayes NIPT
Bayes NIPT
 
Probability Theory for Data Scientists
Probability Theory for Data ScientistsProbability Theory for Data Scientists
Probability Theory for Data Scientists
 
Probabilty1.pptx
Probabilty1.pptxProbabilty1.pptx
Probabilty1.pptx
 
Statistics 1 (FPN) QP
Statistics 1 (FPN) QPStatistics 1 (FPN) QP
Statistics 1 (FPN) QP
 
Probability 4.2
Probability 4.2Probability 4.2
Probability 4.2
 
5. RV and Distributions.pptx
5. RV and Distributions.pptx5. RV and Distributions.pptx
5. RV and Distributions.pptx
 
PROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptxPROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptx
 
Lec12-Probability (1).ppt
Lec12-Probability (1).pptLec12-Probability (1).ppt
Lec12-Probability (1).ppt
 
Lec12-Probability.ppt
Lec12-Probability.pptLec12-Probability.ppt
Lec12-Probability.ppt
 
Lec12-Probability.ppt
Lec12-Probability.pptLec12-Probability.ppt
Lec12-Probability.ppt
 
Lec12-Probability.ppt
Lec12-Probability.pptLec12-Probability.ppt
Lec12-Probability.ppt
 
Lecture_5Conditional_Probability_Bayes_T.pptx
Lecture_5Conditional_Probability_Bayes_T.pptxLecture_5Conditional_Probability_Bayes_T.pptx
Lecture_5Conditional_Probability_Bayes_T.pptx
 
Basic Probability Distribution
Basic Probability Distribution Basic Probability Distribution
Basic Probability Distribution
 
Ch7 gene disorders and pedigree analysis
Ch7 gene disorders and pedigree analysisCh7 gene disorders and pedigree analysis
Ch7 gene disorders and pedigree analysis
 

More from Dongseo University

Lecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdfLecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdfDongseo University
 
Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03Dongseo University
 
Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02Dongseo University
 
Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01Dongseo University
 
Average Linear Selection Algorithm
Average Linear Selection AlgorithmAverage Linear Selection Algorithm
Average Linear Selection AlgorithmDongseo University
 
Lower Bound of Comparison Sort
Lower Bound of Comparison SortLower Bound of Comparison Sort
Lower Bound of Comparison SortDongseo University
 
Running Time of Building Binary Heap using Array
Running Time of Building Binary Heap using ArrayRunning Time of Building Binary Heap using Array
Running Time of Building Binary Heap using ArrayDongseo University
 
Proof By Math Induction Example
Proof By Math Induction ExampleProof By Math Induction Example
Proof By Math Induction ExampleDongseo University
 
Estimating probability distributions
Estimating probability distributionsEstimating probability distributions
Estimating probability distributionsDongseo University
 
2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)Dongseo University
 
2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)Dongseo University
 
2017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #52017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #5Dongseo University
 

More from Dongseo University (20)

Lecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdfLecture_NaturalPolicyGradientsTRPOPPO.pdf
Lecture_NaturalPolicyGradientsTRPOPPO.pdf
 
Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03Evolutionary Computation Lecture notes03
Evolutionary Computation Lecture notes03
 
Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02Evolutionary Computation Lecture notes02
Evolutionary Computation Lecture notes02
 
Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01Evolutionary Computation Lecture notes01
Evolutionary Computation Lecture notes01
 
Markov Chain Monte Carlo
Markov Chain Monte CarloMarkov Chain Monte Carlo
Markov Chain Monte Carlo
 
Simplex Lecture Notes
Simplex Lecture NotesSimplex Lecture Notes
Simplex Lecture Notes
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Median of Medians
Median of MediansMedian of Medians
Median of Medians
 
Average Linear Selection Algorithm
Average Linear Selection AlgorithmAverage Linear Selection Algorithm
Average Linear Selection Algorithm
 
Lower Bound of Comparison Sort
Lower Bound of Comparison SortLower Bound of Comparison Sort
Lower Bound of Comparison Sort
 
Running Time of Building Binary Heap using Array
Running Time of Building Binary Heap using ArrayRunning Time of Building Binary Heap using Array
Running Time of Building Binary Heap using Array
 
Running Time of MergeSort
Running Time of MergeSortRunning Time of MergeSort
Running Time of MergeSort
 
Binary Trees
Binary TreesBinary Trees
Binary Trees
 
Proof By Math Induction Example
Proof By Math Induction ExampleProof By Math Induction Example
Proof By Math Induction Example
 
TRPO and PPO notes
TRPO and PPO notesTRPO and PPO notes
TRPO and PPO notes
 
Estimating probability distributions
Estimating probability distributionsEstimating probability distributions
Estimating probability distributions
 
2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)2018-2 Machine Learning (Wasserstein GAN and BEGAN)
2018-2 Machine Learning (Wasserstein GAN and BEGAN)
 
2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)2018-2 Machine Learning (Linear regression, Logistic regression)
2018-2 Machine Learning (Linear regression, Logistic regression)
 
2017-2 ML W11 GAN #1
2017-2 ML W11 GAN #12017-2 ML W11 GAN #1
2017-2 ML W11 GAN #1
 
2017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #52017-2 ML W9 Reinforcement Learning #5
2017-2 ML W9 Reinforcement Learning #5
 

Recently uploaded

Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPCeline George
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...Nguyen Thanh Tu Collection
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroomSamsung Business USA
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Osopher
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 

Recently uploaded (20)

Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERP
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Chi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical VariableChi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical Variable
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 

2013-1 Machine Learning Lecture 03 - Naïve Bayes Classifiers

  • 2. Probability • What is the probability that you get hit in the head with bird droppings when you go outside? ▫ Initially shown in one episode of Korea TV show ▫ Asked in one BBS of an elite group in Korea  no one gave the right answer • It is difficult to define “probability” ▫ As difficult as defining “science”, “history”, etc. • 16 different definitions • Frequentist vs. Bayesian
  • 3. Bayesian Probability • Can assign probability on any statement • Can be used to show the degree of one’s belief, or degree of one’s knowledge. • Example of subjectiveness: Alice, Bob, and Carol ▫ Alice tosses a new coin 10 times  3/10 heads ▫ Bob tosses the coin 10 times  4/10 heads ▫ Carol has watched them all  7/20 heads • Probabilities in Monty Hall ▫ MC knows where the car is  1 ▫ Guest asked again after MC opened the door  2/3 ▫ Viewer started watching the show after MC opened the door  1/2
  • 4. Bayes Theorem • Probability – P(A) • Conditional Probability – P(A|C) • P(A|B) = P(A,B)/P(B) • P(B|A) = P(A,B)/P(A) • P(A|B) = {P(B|A)P(A)}/P(B) • P(C|D) = {P(D|C)P(C)}/P(D) ▫ P(C|D) : The probability of class given data (Posterior Probability) ▫ P(C) : Prior Probability ▫ P(D|C) : Likelihood ▫ P(D) : constant, so ignored
  • 5. Does patient have cancer or not? • A patient takes a lab test and the result comes back positive. It is known that the test returns a correct positive result in only 99% of the cases and a correct negative result in only 95% of t he cases. Furthermore, only 0.03 of the entire population has this disease. 1. What is the probability that this patient has cancer? 2. What is the probability that he does not have cancer? 3. What is the diagnosis?
  • 6. Bayes Classifier • Recall P(C|X1,X2,…Xn) = P(C)P(X1,X2,…Xn|C)/P(X1,X2,…Xn) •  P(C|X1,X2,…Xn) α P(C)P(X1,X2,…Xn|C) • Maximum A Posteriori hypothesis ▫ hMAP = argmax P(D|h)P(h) • Maximum Likelihood hypothesis ▫ hML = argmax P(D|h)
  • 7. Naïve Bayes Classifier • Recall P(C|X1,X2,…Xn) = P(C)P(X1,X2,…Xn|C)/P(X1,X2,…Xn) •  P(C|X1,X2,…Xn) α P(C)P(X1,X2,…Xn|C) • It is hard to calculate joint probabilities ▫ Too many cases ▫ Too little data • If we ignore the dependences among X1,X2,…Xn? ▫ Why? Because we are naïve. ▫ More precisely, suppose X1,X2,…Xn are conditionally independent of each other given C • P(C|X1,X2,…Xn) α P(C) * Π P(Xi|C)
  • 8. Question: For the day <sunny, cool, high, strong>, what’s the play prediction?
  • 9. Wind Humidity Temp Outlook PlayP(Play=Y) 9/14 P(Play=N) 4/14 P(Sunny|P) P(Overcast|P) P(Rain|P) Play= Y 2/9 4/9 3/9 Play= N 3/5 0/5 2/5 P(Hot|P) P(Mild|P) P(Cool|P) Play= Y 2/9 4/9 3/9 Play= N 2/5 2/5 1/5
  • 10. Zero Occurrence • When a feature is never occurred in the training set  zero frequency  PANIC: makes all terms zero • Smoothing the distribution ▫ Laplacian Smoothing ▫ Dirichlet Priors Smoothing ▫ and many more (Absolute Discouting, Jelinek- Mercer smoothing, Katz smoothing, Good-Turing smoothing, etc.)
  • 11. Extension of NBC • NBC is actually very effective • Selective Bayesian Classifiers (SBC) • Tree Augmented Naïve Bayes (TAN) ▫ ChowLiu algorithm (CL-TAN) ▫ SuperParent algorithm (SP-TAN) • Attribute Value Taxonomy Guided Naïve Bayes Learner (AVT-NBL) • n-gram Augmented Naïve Bayes