SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Machine Learning
LEC 04: Maximum Likelihood Estimation
Machine Learning
L E C 0 4
TA1
Mohammad Akbari
Instructor
TAs
00-00
Time
Maximum Likelihood
Estimation
Machine Learning
LEC 04: Maximum Likelihood Estimation
Outline of the lecture
• In this lecture, we formulate the problem of linear prediction using
probabilities. Wealso introduce the maximum likelihood estimate and
show that it coincides with the least squares estimate. The goal of the
lecture is for you to learn:
• Gaussian distributions
• How to formulate the likelihood for linear regression
• Computing the maximum likelihood estimates for linear
regression.
• Entropy and its relation to loss, probability and learning.
Machine Learning
LEC 04: Maximum Likelihood Estimation
Univariate Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Univariate Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Univariate Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Univariate Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Sampling from a Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Sampling from a Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Sampling from a Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Sampling from a Gaussian distribution
Machine Learning
LEC 04: Maximum Likelihood Estimation
Covariance, correlation and multivariate Gaussians
Machine Learning
LEC 04: Maximum Likelihood Estimation
Covariance, correlation and multivariate Gaussians
Machine Learning
LEC 04: Maximum Likelihood Estimation
Covariance, correlation and multivariate Gaussians
Machine Learning
LEC 04: Maximum Likelihood Estimation
Bivariate Gaussian distribution example
Assume we have two independent univariate Gaussian variables
x1 = N ( µ1 , s 2 ) and x2 = N ( µ2 , s 2 )
Their joint distribution p( x1, x2 ) is:
Machine Learning
LEC 04: Maximum Likelihood Estimation
We have n=3 data points y1 = 1, y2 = 0.5, y3 = 1.5, which are independent
and Gaussian with unknown mean q and variance 1:
yi ~ N ( q , 1 ) = q + N ( 0 , 1 )
with likelihood P( y1 y2 y3 |q ) = P( y1 |q ) P( y1 |q ) P( y3 |q ) . Consider
two guesses of q, 1 and 2.5. Which has higher likelihood (probability of
generating the three observations)?
Finding the q that maximizes the likelihood is equivalent to moving the
Gaussian until the product of 3 green bars (likelihood) is maximized.
Machine Learning
LEC 04: Maximum Likelihood Estimation
The likelihood for linear regression
Let us assume that each label yi is Gaussian distributed with mean xi
Tq
and variance s 2, which in short we write as:
yi = N ( xi
Tq , s 2 ) = xi
Tq + N ( 0, s 2 )
Machine Learning
LEC 04: Maximum Likelihood Estimation
|
Machine Learning
LEC 04: Maximum Likelihood Estimation
|
Machine Learning
LEC 04: Maximum Likelihood Estimation
Maximum likelihood
Machine Learning
LEC 04: Maximum Likelihood Estimation
The ML estimate of q is:
Machine Learning
LEC 04: Maximum Likelihood Estimation
The ML estimate of s is:
Machine Learning
LEC 04: Maximum Likelihood Estimation
Making predictions
The ML plugin prediction, given the training data D=( X , y ), for a new
input x* and known s 2 is given by:
P(y| x* ,D, s 2 ) = N (y| x*
T q ML , s 2 )
Machine Learning
LEC 04: Maximum Likelihood Estimation
Confidence in the predictions
Machine Learning
LEC 04: Maximum Likelihood Estimation
Bernoulli: a model for coins
q if x=1
1- q if x=0
A Bernoulli random variable r.v. X takes values in {0,1}
p(x|q ) =
Where q 2 (0,1). We can write this probability more succinctly as
follows:
Machine Learning
LEC 04: Maximum Likelihood Estimation
Entropy
In information theory, entropy H is a measure of the uncertainty
associated with a random variable. It is defined as:
H(X) = -S p(x|q ) log p(x|q )
x
Example: For a Bernoulli variable X, the entropy is:
Machine Learning
LEC 04: Maximum Likelihood Estimation
Entropy of a Gaussian in D dimensions
Machine Learning
LEC 04: Maximum Likelihood Estimation
MLE - properties
For independent and identically distributed (i.i.d.) data from p(x|µ0),
the MLE minimizes the Kullback-Leibler divergence:
Machine Learning
LEC 04: Maximum Likelihood Estimation
MLE - properties
arg min log
µ
p(xi |µ0)
p(xi|µ)
p(x| 0
µ )dx
Machine Learning
LEC 04: Maximum Likelihood Estimation
Next lecture
In the next lecture, we introduce ridge regression, bases functions and
look at the issue of controlling complexity.

Más contenido relacionado

Similar a ML-04.pdf

Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 

Similar a ML-04.pdf (20)

Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Montecarlophd
MontecarlophdMontecarlophd
Montecarlophd
 
DL-unit-1.pptx
DL-unit-1.pptxDL-unit-1.pptx
DL-unit-1.pptx
 
Prob distros
Prob distrosProb distros
Prob distros
 
Statistical computing2
Statistical computing2Statistical computing2
Statistical computing2
 
Chapter4
Chapter4Chapter4
Chapter4
 
probability assignment help (2)
probability assignment help (2)probability assignment help (2)
probability assignment help (2)
 
Error analysis statistics
Error analysis   statisticsError analysis   statistics
Error analysis statistics
 
Chapter1
Chapter1Chapter1
Chapter1
 
Tutorial on Belief Propagation in Bayesian Networks
Tutorial on Belief Propagation in Bayesian NetworksTutorial on Belief Propagation in Bayesian Networks
Tutorial on Belief Propagation in Bayesian Networks
 
Probabilistic systems assignment help
Probabilistic systems assignment helpProbabilistic systems assignment help
Probabilistic systems assignment help
 
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
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Cheatsheet supervised-learning
Cheatsheet supervised-learningCheatsheet supervised-learning
Cheatsheet supervised-learning
 
Machine learning mathematicals.pdf
Machine learning mathematicals.pdfMachine learning mathematicals.pdf
Machine learning mathematicals.pdf
 
Probabilistic systems exam help
Probabilistic systems exam helpProbabilistic systems exam help
Probabilistic systems exam help
 
1249320870000 asgn 1-jm (1)
1249320870000 asgn 1-jm (1)1249320870000 asgn 1-jm (1)
1249320870000 asgn 1-jm (1)
 
A comparison of three learning methods to predict N20 fluxes and N leaching
A comparison of three learning methods to predict N20 fluxes and N leachingA comparison of three learning methods to predict N20 fluxes and N leaching
A comparison of three learning methods to predict N20 fluxes and N leaching
 
More on randomization semi-definite programming and derandomization
More on randomization semi-definite programming and derandomizationMore on randomization semi-definite programming and derandomization
More on randomization semi-definite programming and derandomization
 
Lecture7 channel capacity
Lecture7   channel capacityLecture7   channel capacity
Lecture7 channel capacity
 

Más de Mohammad Akbari (6)

ML-09.pdf
ML-09.pdfML-09.pdf
ML-09.pdf
 
ML-08.pdf
ML-08.pdfML-08.pdf
ML-08.pdf
 
ML-06.pdf
ML-06.pdfML-06.pdf
ML-06.pdf
 
ML-05.pdf
ML-05.pdfML-05.pdf
ML-05.pdf
 
ML-03.pdf
ML-03.pdfML-03.pdf
ML-03.pdf
 
ML-02.pdf
ML-02.pdfML-02.pdf
ML-02.pdf
 

Último

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Último (20)

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

ML-04.pdf

  • 1. Machine Learning LEC 04: Maximum Likelihood Estimation Machine Learning L E C 0 4 TA1 Mohammad Akbari Instructor TAs 00-00 Time Maximum Likelihood Estimation
  • 2. Machine Learning LEC 04: Maximum Likelihood Estimation Outline of the lecture • In this lecture, we formulate the problem of linear prediction using probabilities. Wealso introduce the maximum likelihood estimate and show that it coincides with the least squares estimate. The goal of the lecture is for you to learn: • Gaussian distributions • How to formulate the likelihood for linear regression • Computing the maximum likelihood estimates for linear regression. • Entropy and its relation to loss, probability and learning.
  • 3. Machine Learning LEC 04: Maximum Likelihood Estimation Univariate Gaussian distribution
  • 4. Machine Learning LEC 04: Maximum Likelihood Estimation Univariate Gaussian distribution
  • 5. Machine Learning LEC 04: Maximum Likelihood Estimation Univariate Gaussian distribution
  • 6. Machine Learning LEC 04: Maximum Likelihood Estimation Univariate Gaussian distribution
  • 7. Machine Learning LEC 04: Maximum Likelihood Estimation Sampling from a Gaussian distribution
  • 8. Machine Learning LEC 04: Maximum Likelihood Estimation Sampling from a Gaussian distribution
  • 9. Machine Learning LEC 04: Maximum Likelihood Estimation Sampling from a Gaussian distribution
  • 10. Machine Learning LEC 04: Maximum Likelihood Estimation Sampling from a Gaussian distribution
  • 11. Machine Learning LEC 04: Maximum Likelihood Estimation Covariance, correlation and multivariate Gaussians
  • 12. Machine Learning LEC 04: Maximum Likelihood Estimation Covariance, correlation and multivariate Gaussians
  • 13. Machine Learning LEC 04: Maximum Likelihood Estimation Covariance, correlation and multivariate Gaussians
  • 14. Machine Learning LEC 04: Maximum Likelihood Estimation Bivariate Gaussian distribution example Assume we have two independent univariate Gaussian variables x1 = N ( µ1 , s 2 ) and x2 = N ( µ2 , s 2 ) Their joint distribution p( x1, x2 ) is:
  • 15. Machine Learning LEC 04: Maximum Likelihood Estimation We have n=3 data points y1 = 1, y2 = 0.5, y3 = 1.5, which are independent and Gaussian with unknown mean q and variance 1: yi ~ N ( q , 1 ) = q + N ( 0 , 1 ) with likelihood P( y1 y2 y3 |q ) = P( y1 |q ) P( y1 |q ) P( y3 |q ) . Consider two guesses of q, 1 and 2.5. Which has higher likelihood (probability of generating the three observations)? Finding the q that maximizes the likelihood is equivalent to moving the Gaussian until the product of 3 green bars (likelihood) is maximized.
  • 16. Machine Learning LEC 04: Maximum Likelihood Estimation The likelihood for linear regression Let us assume that each label yi is Gaussian distributed with mean xi Tq and variance s 2, which in short we write as: yi = N ( xi Tq , s 2 ) = xi Tq + N ( 0, s 2 )
  • 17. Machine Learning LEC 04: Maximum Likelihood Estimation |
  • 18. Machine Learning LEC 04: Maximum Likelihood Estimation |
  • 19. Machine Learning LEC 04: Maximum Likelihood Estimation Maximum likelihood
  • 20. Machine Learning LEC 04: Maximum Likelihood Estimation The ML estimate of q is:
  • 21. Machine Learning LEC 04: Maximum Likelihood Estimation The ML estimate of s is:
  • 22. Machine Learning LEC 04: Maximum Likelihood Estimation Making predictions The ML plugin prediction, given the training data D=( X , y ), for a new input x* and known s 2 is given by: P(y| x* ,D, s 2 ) = N (y| x* T q ML , s 2 )
  • 23. Machine Learning LEC 04: Maximum Likelihood Estimation Confidence in the predictions
  • 24. Machine Learning LEC 04: Maximum Likelihood Estimation Bernoulli: a model for coins q if x=1 1- q if x=0 A Bernoulli random variable r.v. X takes values in {0,1} p(x|q ) = Where q 2 (0,1). We can write this probability more succinctly as follows:
  • 25. Machine Learning LEC 04: Maximum Likelihood Estimation Entropy In information theory, entropy H is a measure of the uncertainty associated with a random variable. It is defined as: H(X) = -S p(x|q ) log p(x|q ) x Example: For a Bernoulli variable X, the entropy is:
  • 26. Machine Learning LEC 04: Maximum Likelihood Estimation Entropy of a Gaussian in D dimensions
  • 27. Machine Learning LEC 04: Maximum Likelihood Estimation MLE - properties For independent and identically distributed (i.i.d.) data from p(x|µ0), the MLE minimizes the Kullback-Leibler divergence:
  • 28. Machine Learning LEC 04: Maximum Likelihood Estimation MLE - properties arg min log µ p(xi |µ0) p(xi|µ) p(x| 0 µ )dx
  • 29. Machine Learning LEC 04: Maximum Likelihood Estimation Next lecture In the next lecture, we introduce ridge regression, bases functions and look at the issue of controlling complexity.