# How to implement AIC for mixture model with EM

I fit EM algorithm to mixture data. Then, I would like to implement AIC for this mixture data. I really could not find a clear mathematical formula to implement AIC for mixture data when we use EM algorithm. So, based on my reading, I understand that:

$$AIC = -2\log(\hat{\theta}) + 2K$$

where K is the number of model parameters.

$$\log(\hat{\theta}) = \sum (\tau_1(\log(\pi_1)+\log(c_1(\theta))) + (\tau_2(\log(\pi_2)+\log(c_2(\theta)))$$

where $c_1$ and $c_2$ are the first and second mixture components (densities) respectively.

Is that correct? Or do I did something wrong?