SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
Maximum A Posteriori (MAP) Estimation
Aarti Singh
Machine Learning 10-315
Jan 31, 2022
Max A Posteriori (MAP) estimation
Can we bring in prior knowledge if data is not enough?
• Assume a prior (before seeing data D) distribution P(q) for
parameters q
10
• Choose value that maximizes a posterior distribution P(q|D) of
parameters q
How to choose prior distribution?
• P(q)
– Prior knowledge about domain e.g. unbiased coin P(q) = 1/2
– A mathematically convenient form e.g. “conjugate” prior
If P(q) is conjugate prior for P(D|q),
then Posterior has same form as prior
Posterior = Likelihood x Prior
P(q|D) = P(D|q) x P(q)
e.g. Beta Bernoulli Beta q = bias of coin
Gaussian Gaussian Gaussian q = mean µ
(known S)
inv-Wishart Gaussian inv-Wishart q = cov matrix S
(known µ) 11
MAP estimation for Bernoulli r.v.
12
Choose q that maximizes a posterior probability
MAP estimate of probability of head (using Beta conjugate prior):
Beta distribution
13
More concentrated as values of bH, bT increase
Beta(2,3) Beta(20,30)
MAP estimation for Bernoulli r.v.
14
Choose q that maximizes a posterior probability
MAP estimate of probability of head (using Beta conjugate prior):
Count of H/T simply get
added to parameters
Beta conjugate prior
15
As n = aH + aT increases, posterior distribution becomes more
concentrated
Beta(2,3) Beta(20,30)
After observing 1 Tail After observing
18 Heads and
28 Tails
MAP estimation for Bernoulli r.v.
16
Choose q that maximizes a posterior probability
MAP estimate of probability of head:
Equivalent to adding extra coin flips (βH - 1 heads, βT - 1 tails)
Mode of Beta
distribution
As we get more data, effect of prior is “washed out”
Count of H/T simply get
added to parameters
Parameters q = (μ,σ2)
• Mean μ (known σ2 ):
Gaussian prior P(µ)
• Variance σ2 (known μ): inv-Wishart Distribution
MAP estimation for Gaussian r.v.
17
As we get more data, effect of prior is “washed out”
= N(h,l2)
MLE vs. MAP
18
l Maximum Likelihood estimation (MLE)
Choose value that maximizes the probability of observed data
l Maximum a posteriori (MAP) estimation
Choose value that is most probable given observed data and
prior belief
Poll
Ø When is MAP same as MLE?
A. When posterior is same as prior
B. When prior is uniform
C. When prior is zero for all values except one value of q
19

Contenu connexe

Similaire à MAP.pdf

Discrete probability
Discrete probabilityDiscrete probability
Discrete probabilityRanjan Kumar
 
Locality-sensitive hashing for search in metric space
Locality-sensitive hashing for search in metric space Locality-sensitive hashing for search in metric space
Locality-sensitive hashing for search in metric space Eliezer Silva
 
Gaussian processing
Gaussian processingGaussian processing
Gaussian processing홍배 김
 
Kernel estimation(ref)
Kernel estimation(ref)Kernel estimation(ref)
Kernel estimation(ref)Zahra Amini
 
AIML unit-2(1).ppt
AIML unit-2(1).pptAIML unit-2(1).ppt
AIML unit-2(1).pptashudhanraj
 
Bayesian statistics intro using r
Bayesian statistics intro using rBayesian statistics intro using r
Bayesian statistics intro using rJosue Guzman
 
Mining of massive datasets
Mining of massive datasetsMining of massive datasets
Mining of massive datasetsAshic Mahtab
 

Similaire à MAP.pdf (9)

Discrete probability
Discrete probabilityDiscrete probability
Discrete probability
 
Locality-sensitive hashing for search in metric space
Locality-sensitive hashing for search in metric space Locality-sensitive hashing for search in metric space
Locality-sensitive hashing for search in metric space
 
Gaussian processing
Gaussian processingGaussian processing
Gaussian processing
 
Athens workshop on MCMC
Athens workshop on MCMCAthens workshop on MCMC
Athens workshop on MCMC
 
Kernel estimation(ref)
Kernel estimation(ref)Kernel estimation(ref)
Kernel estimation(ref)
 
AIML unit-2(1).ppt
AIML unit-2(1).pptAIML unit-2(1).ppt
AIML unit-2(1).ppt
 
Bayesian statistics intro using r
Bayesian statistics intro using rBayesian statistics intro using r
Bayesian statistics intro using r
 
Mining of massive datasets
Mining of massive datasetsMining of massive datasets
Mining of massive datasets
 
CLIM Fall 2017 Course: Statistics for Climate Research, Geostats for Large Da...
CLIM Fall 2017 Course: Statistics for Climate Research, Geostats for Large Da...CLIM Fall 2017 Course: Statistics for Climate Research, Geostats for Large Da...
CLIM Fall 2017 Course: Statistics for Climate Research, Geostats for Large Da...
 

Dernier

BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
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...Delhi Call girls
 
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.pptxolyaivanovalion
 
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.pptxolyaivanovalion
 
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.pptxolyaivanovalion
 
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
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
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 interactionfulawalesam
 
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.pdfMarinCaroMartnezBerg
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
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...Valters Lauzums
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 

Dernier (20)

BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
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...
 
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
 
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
 
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
 
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...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
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
 
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
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).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...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 

MAP.pdf

  • 1. Maximum A Posteriori (MAP) Estimation Aarti Singh Machine Learning 10-315 Jan 31, 2022
  • 2. Max A Posteriori (MAP) estimation Can we bring in prior knowledge if data is not enough? • Assume a prior (before seeing data D) distribution P(q) for parameters q 10 • Choose value that maximizes a posterior distribution P(q|D) of parameters q
  • 3. How to choose prior distribution? • P(q) – Prior knowledge about domain e.g. unbiased coin P(q) = 1/2 – A mathematically convenient form e.g. “conjugate” prior If P(q) is conjugate prior for P(D|q), then Posterior has same form as prior Posterior = Likelihood x Prior P(q|D) = P(D|q) x P(q) e.g. Beta Bernoulli Beta q = bias of coin Gaussian Gaussian Gaussian q = mean µ (known S) inv-Wishart Gaussian inv-Wishart q = cov matrix S (known µ) 11
  • 4. MAP estimation for Bernoulli r.v. 12 Choose q that maximizes a posterior probability MAP estimate of probability of head (using Beta conjugate prior):
  • 5. Beta distribution 13 More concentrated as values of bH, bT increase Beta(2,3) Beta(20,30)
  • 6. MAP estimation for Bernoulli r.v. 14 Choose q that maximizes a posterior probability MAP estimate of probability of head (using Beta conjugate prior): Count of H/T simply get added to parameters
  • 7. Beta conjugate prior 15 As n = aH + aT increases, posterior distribution becomes more concentrated Beta(2,3) Beta(20,30) After observing 1 Tail After observing 18 Heads and 28 Tails
  • 8. MAP estimation for Bernoulli r.v. 16 Choose q that maximizes a posterior probability MAP estimate of probability of head: Equivalent to adding extra coin flips (βH - 1 heads, βT - 1 tails) Mode of Beta distribution As we get more data, effect of prior is “washed out” Count of H/T simply get added to parameters
  • 9. Parameters q = (μ,σ2) • Mean μ (known σ2 ): Gaussian prior P(µ) • Variance σ2 (known μ): inv-Wishart Distribution MAP estimation for Gaussian r.v. 17 As we get more data, effect of prior is “washed out” = N(h,l2)
  • 10. MLE vs. MAP 18 l Maximum Likelihood estimation (MLE) Choose value that maximizes the probability of observed data l Maximum a posteriori (MAP) estimation Choose value that is most probable given observed data and prior belief
  • 11. Poll Ø When is MAP same as MLE? A. When posterior is same as prior B. When prior is uniform C. When prior is zero for all values except one value of q 19