Here is a screenshot from an assignment I am currently working on - these are the Expectation-Maximization update rules for the parameters $\omega$ (latent component "responsibilities"), $\mu$, and $\Sigma$ for a mixture of multivariate Gaussians.
To clarify notation (though this isn't actually too important, my question is for general E-M):
- $p(m|x_t;\theta)$ is the probability of latent component m given an $x_t$ (and there are a total of $T$ such $x_t$'s in the entire dataset $X$)
- $\theta$ is a parameter which holds $\omega$, $\mu$, and $\Sigma$
Within a single M-step, the updates for $\mu$ occur before the updates for $\Sigma$ (as in, the literal line of code for the $\mu$ update gets executed earlier).
So as I code this I am wondering: Is it kosher to use my updated $\mu$ in my calculation of the $\Sigma$ update, within the same "M-step"?
On one hand, I would think that theoretically, all of these parameter updates are supposed to happen "instantaneously" and at the same time as each other - meaning, I should use the old, un-updated $\mu$ from just before my update.
On the other hand, the updated $\mu$ is supposed to converge towards the "correct" value, so my updated $\mu$ should be "closer" to the truth - meaning that if I use the new $\mu$, it ought to give me a more "accurate" $\Sigma$ update.
Can anyone comment? Thank you!
Small edit: re the (very reasonable!) comment below that the notation should be more explicit in specifying $\theta^{current}$ vs $\theta^{update}$ - I completely agree that the notation as provided from the assignment is not at all clear, and hence the impetus for this question.
I've simplified, but in code my updates look something like this, and this performs reasonably well:
theta.omega = update_omega(theta, X)
theta.mu = update_mu(theta, X)
theta.Sigma = update_Sigma(theta, X)
While the provided notation can be considered "bad", it does translate nicely to code, so perhaps the professor was just trying to help. If I weren't thinking too hard it would be easy to miss the fact that an updated theta is being fed into each sequential step.
I'm asking this question because I am curious about whether this is standard practice for implementing EM (as it seems to be in the sklearn GaussianMixture
class - I believe that within a single M-step they take a freshly updated mu and feed it right into the covariance update), or whether this is technically a "different" approach (as the third comment may suggest!).
self-study
tag and it has been added. I agree that the notation provided is unclear; if it had been explicit then I wouldn't need to ask this question (though I'll add a little edit above). Thanks for linking the paper as well, I will read it. $\endgroup$