I am trying to get each components distribution from a mixture of discrete distribution but the model get stuck in m-step after just 1 or 2 iteration due to singular matrix error. I tried many different initialization for distribution parameters, proportions and also tried different distributions but with no luck. Is EM Algo good for mixture of categorical (multinomial) distributions? Or, is there some mistake in my implementation? Here’s the link of my IPython notebook on GitHub.