Gaussian Mixture Model with EM Algorithm

Clustering DS practice problem on Onlearn.

Difficulty: hard.

Topics: Understanding Gaussian Mixture Models (GMM) via Expectation-Maximization, Responsibility Matrix, Mixing Coefficients, Log-Likelihood Convergence, Covariance Matrix Estimation, Soft Assignment, Probability Theory, Linear Algebra, Optimization Theory, Statistical Inference, Unsupervised Learning, Maximum Likelihood Estimation, Latent Variable Models, Expectation-Maximization, Multivariate Normal Distributions, Clustering Algorithms.

Implement a GMM class that performs clustering on a 1D dataset using the Expectation Maximization algorithm. Initialize the model with a fixed number of components and perform 10 iterations to update the means, covariances, and weights. Return the final means of the clusters.