em-gaussian
em-gaussian copied to clipboard
Expectation Step
In the expectation step, you assigned every sample to the most likely cluster. This is called hard clustering where clusters don't overlap, like k-means. However, EM is a soft clustering algorithm, which doesn't assign samples to a cluster, instead calculates responsibilities of every sample for each cluster and updates that in E step. I think that the E-step of your code needs to be corrected.