Answers.Body: <ul>
  <li>EM algorithm is a <strong>numerical method</strong>. It is not specific to any machine learning model. Common applications include hidden markov model and mixed Gaussians. The algorithm is <strong>not</strong> a classifier.</li>
  <li>Logistic regression is a <strong>statistical model</strong>. You need to pick a numerical method for logistic regression.</li>
  <li>Naive Bayesian is a <strong>statistical model</strong>. You need to pick a numerical method (if closed-form posterior distribution not available).</li>
  </ul>
  
  <p>You will need to understand <code>maximum likelihood</code> before you tackle the EM algorithm. Briefly, the maximum likelihood is a method for estimating the most likely parameters in your model. For instance, if you have a sequence of randomly and identically distributed Gaussian random variables, the maximum likelihood estimator for your Gaussian mean is just the sample mean.</p>
  
  <p>When you fit a logistic regression, you use a numerical method (e.g. iteratively reweighted least squares) to maximise your log-likelihood function.</p>
  
  <p>Everything is good, but it's not possible to maximum the likelihood directly if you have some latent variables. A common example is modelling your DNA sequences with hidden markov model, where the latent state is unknown. </p>
  
  <p>You can't do it because you don't know the latent variables. If you do, they are not latent by definition.</p>
  
  <p><code>EM algorithm</code> is a numerical method to estimate maximum likelihood when you have latent variables. The mathematics is complicated but the idea is simple. You start off with some initial values for your parameters. You update your parameters and latent variables, and the algorithm converges when the change in the log-likelihood function falls below some threshold.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-29T02:33:43.847Z
Answers.LastActivityDate: 2017-03-30T01:27:03.250Z
Answers.LastEditDate: 2017-03-30T01:27:03.250Z
Answers.UserDisplayName: SmallChess
Body: <p>While studying machine learning algorithms, I often see the term "expectation-maximisation" (or EM), and how it is used to estimate parameters, where the model depends on unobserved latent variables. </p>
  
  <p>The way I see it, it is like a probabilistic/statistical way to make predictions (I think I'm confusing something but this is the way I see it).</p>
  
  <p>Which made me wonder how exactly does EM differ from probabilistic classifiers like naive bayes or logistic regression? Is EM something that exists on its own or is it employed within machine learning algorithms? And, if we use naive Bayes, for example, are we implicitly using EM?</p>
  
Tags: <machine-learning><expectation-maximization>
Title: What is expectation-maximization in machine learning?
UserDisplayName: Guest2000
ThreadText: # What is expectation-maximization in machine learning?
  
  (Asked by: username_0 on 2017-03-28)
  
  While studying machine learning algorithms, I often see the term "expectation-maximisation" (or EM), and how it is used to estimate parameters, where the model depends on unobserved latent variables.
  
  The way I see it, it is like a probabilistic/statistical way to make predictions (I think I'm confusing something but this is the way I see it).
  
  Which made me wonder how exactly does EM differ from probabilistic classifiers like naive bayes or logistic regression? Is EM something that exists on its own or is it employed within machine learning algorithms? And, if we use naive Bayes, for example, are we implicitly using EM?
  
  **Tags:** machine-learning, expectation-maximization
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-29. Score: 4 | Accepted answer
  
  * EM algorithm is a **numerical method**. It is not specific to any machine learning model. Common applications include hidden markov model and mixed Gaussians. The algorithm is **not** a classifier.
  * Logistic regression is a **statistical model**. You need to pick a numerical method for logistic regression.
  * Naive Bayesian is a **statistical model**. You need to pick a numerical method (if closed-form posterior distribution not available).
  
  You will need to understand `maximum likelihood` before you tackle the EM algorithm. Briefly, the maximum likelihood is a method for estimating the most likely parameters in your model. For instance, if you have a sequence of randomly and identically distributed Gaussian random variables, the maximum likelihood estimator for your Gaussian mean is just the sample mean.
  
  When you fit a logistic regression, you use a numerical method (e.g. iteratively reweighted least squares) to maximise your log-likelihood function.
  
  Everything is good, but it's not possible to maximum the likelihood directly if you have some latent variables. A common example is modelling your DNA sequences with hidden markov model, where the latent state is unknown.
  
  You can't do it because you don't know the latent variables. If you do, they are not latent by definition.
  
  `EM algorithm` is a numerical method to estimate maximum likelihood when you have latent variables. The mathematics is complicated but the idea is simple. You start off with some initial values for your parameters. You update your parameters and latent variables, and the algorithm converges when the change in the log-likelihood function falls below some threshold.
  
  
  ---
  
  