狠狠撸

狠狠撸Share a Scribd company logo
Ali Madani
https://www.linkedin.com/in/amlearning
/
Bayes rule and Naive Bayes
Classifier
What we know when training a model
2
p(X1=x1|Class=1)
Class=1
Class=2
p(X2=x2|Class=1)
p(Xm=xm|Class=1)
What do we care about?
3
p(Class=1|X1=x1,X2=x2,…,Xm=xm)=?
Class=1
Class=2
?
Bayes rule is useful to figure out the relationship
4
p(A|B)p(B)=p(B|A)p(A)
Bayes rule is useful to figure out the relationship
5
p(Class=1|X1=x1,X2=x2,…,Xm=xm)*
p(X1=x1,X2=x2,…,Xm=xm)=
p(X1=x1,X2=x2,…,Xm=xm|Class=1)*p(Class=1)
p(A|B)p(B)=p(B|A)p(A)
The relationship looks complicated
6
WWW*p(X1=x1,X2=x2,…,Xm=xm)=
p(X1=x1,X2=x2,…,Xm=xm|Class=1)p(Class=1)
WWW: What We Want
p(Class=1):easy to calculate
Naive assumption
7
Naive: Independent contributions of features in classification
p(X1=x1,X2=x2,…,Xm=xm)=p(X1=x1)p(X2=x2)...p(Xm=xm)
p(X1=x1,X2=x2,…,Xm=xm|Class=1)=
p(X1=x1|Class=1)p(X2=x2|Class=1)...p(Xm=xm|Class=1)
Naive Bayes
8
Please share what you
learned with others

More Related Content

What's hot (20)

Algebra 6 Point 7
Algebra 6 Point 7Algebra 6 Point 7
Algebra 6 Point 7
herbison
?
Alg lesson 9
Alg lesson 9Alg lesson 9
Alg lesson 9
sphelps25
?
Distributive
DistributiveDistributive
Distributive
Kate Rimando
?
1 2 solving multi-step equations
1 2 solving multi-step equations1 2 solving multi-step equations
1 2 solving multi-step equations
hisema01
?
Lesson 31
Lesson 31Lesson 31
Lesson 31
sphelps25
?
Evaluating Algebraic Expression
Evaluating Algebraic ExpressionEvaluating Algebraic Expression
Evaluating Algebraic Expression
Free Math Powerpoints
?
Algebraic Simplification and evaluation
Algebraic Simplification and evaluationAlgebraic Simplification and evaluation
Algebraic Simplification and evaluation
Puna Ripiye
?
Section 1.5 distributive property (algebra)
Section 1.5 distributive property (algebra)Section 1.5 distributive property (algebra)
Section 1.5 distributive property (algebra)
Algebra / Mathematics
?
Factorising algebraic expressions
Factorising algebraic expressionsFactorising algebraic expressions
Factorising algebraic expressions
MrGarvey
?
Algebra 6 Point 6
Algebra 6 Point 6Algebra 6 Point 6
Algebra 6 Point 6
herbison
?
Factoring if a is greater than 1 grade8
Factoring if a is greater than 1 grade8Factoring if a is greater than 1 grade8
Factoring if a is greater than 1 grade8
MartinGeraldine
?
Solving Multi Step Equations
Solving Multi Step EquationsSolving Multi Step Equations
Solving Multi Step Equations
Derek Wright
?
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
AraceliLynPalomillo
?
3h. Pedagogy of Mathematics (Part II) - Algebra (Ex 3.8)
3h. Pedagogy of Mathematics (Part II) - Algebra (Ex 3.8)3h. Pedagogy of Mathematics (Part II) - Algebra (Ex 3.8)
3h. Pedagogy of Mathematics (Part II) - Algebra (Ex 3.8)
Dr. I. Uma Maheswari Maheswari
?
Distributive property
Distributive propertyDistributive property
Distributive property
marniekrentz
?
Chapter 6.5
Chapter 6.5Chapter 6.5
Chapter 6.5
nglaze10
?
Absolute Value Equations
Absolute Value EquationsAbsolute Value Equations
Absolute Value Equations
Bitsy Griffin
?
Derivation of rank correlation 1
Derivation of rank correlation 1Derivation of rank correlation 1
Derivation of rank correlation 1
MParveenSyed
?
Dividing Polynomials
Dividing PolynomialsDividing Polynomials
Dividing Polynomials
JonathanSantos232
?
algebraic expression class VIII
algebraic expression class VIIIalgebraic expression class VIII
algebraic expression class VIII
Himani Priya
?
Algebra 6 Point 7
Algebra 6 Point 7Algebra 6 Point 7
Algebra 6 Point 7
herbison
?
1 2 solving multi-step equations
1 2 solving multi-step equations1 2 solving multi-step equations
1 2 solving multi-step equations
hisema01
?
Algebraic Simplification and evaluation
Algebraic Simplification and evaluationAlgebraic Simplification and evaluation
Algebraic Simplification and evaluation
Puna Ripiye
?
Section 1.5 distributive property (algebra)
Section 1.5 distributive property (algebra)Section 1.5 distributive property (algebra)
Section 1.5 distributive property (algebra)
Algebra / Mathematics
?
Factorising algebraic expressions
Factorising algebraic expressionsFactorising algebraic expressions
Factorising algebraic expressions
MrGarvey
?
Algebra 6 Point 6
Algebra 6 Point 6Algebra 6 Point 6
Algebra 6 Point 6
herbison
?
Factoring if a is greater than 1 grade8
Factoring if a is greater than 1 grade8Factoring if a is greater than 1 grade8
Factoring if a is greater than 1 grade8
MartinGeraldine
?
Solving Multi Step Equations
Solving Multi Step EquationsSolving Multi Step Equations
Solving Multi Step Equations
Derek Wright
?
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
ARITHMETIC SEQUENCE, MEAN AND SERIES WEEK 2 QUARTER 1
AraceliLynPalomillo
?
Distributive property
Distributive propertyDistributive property
Distributive property
marniekrentz
?
Absolute Value Equations
Absolute Value EquationsAbsolute Value Equations
Absolute Value Equations
Bitsy Griffin
?
Derivation of rank correlation 1
Derivation of rank correlation 1Derivation of rank correlation 1
Derivation of rank correlation 1
MParveenSyed
?
algebraic expression class VIII
algebraic expression class VIIIalgebraic expression class VIII
algebraic expression class VIII
Himani Priya
?

Recently uploaded (20)

stages-of-moral-development-lawrence-kohlberg-pdf-free.pdf
stages-of-moral-development-lawrence-kohlberg-pdf-free.pdfstages-of-moral-development-lawrence-kohlberg-pdf-free.pdf
stages-of-moral-development-lawrence-kohlberg-pdf-free.pdf
esguerramark1991
?
Media Audiogahwhwhjwjwjwjjwjwjwhwhwjwhwhw
Media AudiogahwhwhjwjwjwjjwjwjwhwhwjwhwhwMedia Audiogahwhwhjwjwjwjjwjwjwhwhwjwhwhw
Media Audiogahwhwhjwjwjwjjwjwjwhwhwjwhwhw
carbsmichael
?
IFRS Finance Powerpoint ppt Finance D.pptx
IFRS Finance Powerpoint  ppt Finance D.pptxIFRS Finance Powerpoint  ppt Finance D.pptx
IFRS Finance Powerpoint ppt Finance D.pptx
amantiwari2091
?
LESSON-2-Synthesizing-Information-PPT.pptx
LESSON-2-Synthesizing-Information-PPT.pptxLESSON-2-Synthesizing-Information-PPT.pptx
LESSON-2-Synthesizing-Information-PPT.pptx
trishflores3
?
Boosting MySQL with Vector Search Scale22X 2025.pdf
Boosting MySQL with Vector Search Scale22X 2025.pdfBoosting MySQL with Vector Search Scale22X 2025.pdf
Boosting MySQL with Vector Search Scale22X 2025.pdf
Alkin Tezuysal
?
A Relative Information Gain-based Query Performance Prediction Framework with...
A Relative Information Gain-based Query Performance Prediction Framework with...A Relative Information Gain-based Query Performance Prediction Framework with...
A Relative Information Gain-based Query Performance Prediction Framework with...
suchanadatta3
?
Introduction Lecture 01 Data Science.pdf
Introduction Lecture 01 Data Science.pdfIntroduction Lecture 01 Data Science.pdf
Introduction Lecture 01 Data Science.pdf
messagetome133
?
Stasiun kernel pabrik kelapa sawit indonesia
Stasiun kernel pabrik kelapa sawit indonesiaStasiun kernel pabrik kelapa sawit indonesia
Stasiun kernel pabrik kelapa sawit indonesia
fikrimanurung1
?
+data_warehousing_hoffer_edm_pp_ch09.ppt
+data_warehousing_hoffer_edm_pp_ch09.ppt+data_warehousing_hoffer_edm_pp_ch09.ppt
+data_warehousing_hoffer_edm_pp_ch09.ppt
aaarashsaadati
?
Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...
Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...
Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...
suchanadatta3
?
april 2024 paper 2 ms. english non fiction
april 2024 paper 2 ms. english non fictionapril 2024 paper 2 ms. english non fiction
april 2024 paper 2 ms. english non fiction
omokoredeolasunbomi
?
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
Timothy Spann
?
AI + Disability. Coded Futures: Better opportunities or biased outcomes?
AI + Disability. Coded Futures: Better opportunities or biased outcomes?AI + Disability. Coded Futures: Better opportunities or biased outcomes?
AI + Disability. Coded Futures: Better opportunities or biased outcomes?
Christine Hemphill
?
HIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICES
HIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICESHIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICES
HIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICES
anastasiapenova16
?
Introduction to Java Programming for High School by 狠狠撸sgo.pptx
Introduction to Java Programming for High School by 狠狠撸sgo.pptxIntroduction to Java Programming for High School by 狠狠撸sgo.pptx
Introduction to Java Programming for High School by 狠狠撸sgo.pptx
mirhuzaifahali
?
Relationship between Happiness & LifeQuality .pdf
Relationship between Happiness & LifeQuality .pdfRelationship between Happiness & LifeQuality .pdf
Relationship between Happiness & LifeQuality .pdf
wrachelsong
?
加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭
加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭
加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭
taqyed
?
Hire Android App Developers in India with Cerebraix
Hire Android App Developers in India with CerebraixHire Android App Developers in India with Cerebraix
Hire Android App Developers in India with Cerebraix
cerebraixs
?
Presentation.2 .reversal. reversal. pptx
Presentation.2 .reversal. reversal. pptxPresentation.2 .reversal. reversal. pptx
Presentation.2 .reversal. reversal. pptx
siliaselim87
?
MLecture 1 Introduction to AI . The basics.pptx
MLecture 1 Introduction to AI . The basics.pptxMLecture 1 Introduction to AI . The basics.pptx
MLecture 1 Introduction to AI . The basics.pptx
FaizaKhan720183
?
stages-of-moral-development-lawrence-kohlberg-pdf-free.pdf
stages-of-moral-development-lawrence-kohlberg-pdf-free.pdfstages-of-moral-development-lawrence-kohlberg-pdf-free.pdf
stages-of-moral-development-lawrence-kohlberg-pdf-free.pdf
esguerramark1991
?
Media Audiogahwhwhjwjwjwjjwjwjwhwhwjwhwhw
Media AudiogahwhwhjwjwjwjjwjwjwhwhwjwhwhwMedia Audiogahwhwhjwjwjwjjwjwjwhwhwjwhwhw
Media Audiogahwhwhjwjwjwjjwjwjwhwhwjwhwhw
carbsmichael
?
IFRS Finance Powerpoint ppt Finance D.pptx
IFRS Finance Powerpoint  ppt Finance D.pptxIFRS Finance Powerpoint  ppt Finance D.pptx
IFRS Finance Powerpoint ppt Finance D.pptx
amantiwari2091
?
LESSON-2-Synthesizing-Information-PPT.pptx
LESSON-2-Synthesizing-Information-PPT.pptxLESSON-2-Synthesizing-Information-PPT.pptx
LESSON-2-Synthesizing-Information-PPT.pptx
trishflores3
?
Boosting MySQL with Vector Search Scale22X 2025.pdf
Boosting MySQL with Vector Search Scale22X 2025.pdfBoosting MySQL with Vector Search Scale22X 2025.pdf
Boosting MySQL with Vector Search Scale22X 2025.pdf
Alkin Tezuysal
?
A Relative Information Gain-based Query Performance Prediction Framework with...
A Relative Information Gain-based Query Performance Prediction Framework with...A Relative Information Gain-based Query Performance Prediction Framework with...
A Relative Information Gain-based Query Performance Prediction Framework with...
suchanadatta3
?
Introduction Lecture 01 Data Science.pdf
Introduction Lecture 01 Data Science.pdfIntroduction Lecture 01 Data Science.pdf
Introduction Lecture 01 Data Science.pdf
messagetome133
?
Stasiun kernel pabrik kelapa sawit indonesia
Stasiun kernel pabrik kelapa sawit indonesiaStasiun kernel pabrik kelapa sawit indonesia
Stasiun kernel pabrik kelapa sawit indonesia
fikrimanurung1
?
+data_warehousing_hoffer_edm_pp_ch09.ppt
+data_warehousing_hoffer_edm_pp_ch09.ppt+data_warehousing_hoffer_edm_pp_ch09.ppt
+data_warehousing_hoffer_edm_pp_ch09.ppt
aaarashsaadati
?
Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...
Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...
Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Que...
suchanadatta3
?
april 2024 paper 2 ms. english non fiction
april 2024 paper 2 ms. english non fictionapril 2024 paper 2 ms. english non fiction
april 2024 paper 2 ms. english non fiction
omokoredeolasunbomi
?
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
2025-03-03-Philly-AAAI-GoodData-Build Secure RAG Apps With Open LLM
Timothy Spann
?
AI + Disability. Coded Futures: Better opportunities or biased outcomes?
AI + Disability. Coded Futures: Better opportunities or biased outcomes?AI + Disability. Coded Futures: Better opportunities or biased outcomes?
AI + Disability. Coded Futures: Better opportunities or biased outcomes?
Christine Hemphill
?
HIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICES
HIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICESHIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICES
HIRE MUYERN TRUST HACKER FOR AUTHENTIC CYBER SERVICES
anastasiapenova16
?
Introduction to Java Programming for High School by 狠狠撸sgo.pptx
Introduction to Java Programming for High School by 狠狠撸sgo.pptxIntroduction to Java Programming for High School by 狠狠撸sgo.pptx
Introduction to Java Programming for High School by 狠狠撸sgo.pptx
mirhuzaifahali
?
Relationship between Happiness & LifeQuality .pdf
Relationship between Happiness & LifeQuality .pdfRelationship between Happiness & LifeQuality .pdf
Relationship between Happiness & LifeQuality .pdf
wrachelsong
?
加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭
加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭
加拿大成绩单购买原版(鲍颁毕业证书)卡尔加里大学毕业证文凭
taqyed
?
Hire Android App Developers in India with Cerebraix
Hire Android App Developers in India with CerebraixHire Android App Developers in India with Cerebraix
Hire Android App Developers in India with Cerebraix
cerebraixs
?
Presentation.2 .reversal. reversal. pptx
Presentation.2 .reversal. reversal. pptxPresentation.2 .reversal. reversal. pptx
Presentation.2 .reversal. reversal. pptx
siliaselim87
?
MLecture 1 Introduction to AI . The basics.pptx
MLecture 1 Introduction to AI . The basics.pptxMLecture 1 Introduction to AI . The basics.pptx
MLecture 1 Introduction to AI . The basics.pptx
FaizaKhan720183
?

Bayes rule and naive bayes classifier