MLCrack

    CLASSICAL ML · INTERVIEW QUESTION

    Explain Gaussian Mixture Models (GMM). How do they differ from K-Means?

    🔴 advanced · Unsupervised Learning

    Hint: Think about soft vs hard assignment, and the EM algorithm.

    Answer

    GMMs model data as a mixture of K Gaussian distributions: p(x) = Σπ_k N(x|μ_k, Σ_k) where π_k are mixing weights. Differences from K-Means:

    1. Soft assignment: GMM gives probability of belonging to each cluster, K-Means assigns hard labels.

    2. Cluster shape: GMM allows elliptical clusters (via covariance Σ_k), K-Means assumes spherical.

    Training: GMM uses Expectation-Maximization (EM): E-step computes responsibilities (soft assignments), M-step updates parameters. K-Means is a special case of GMM with fixed identity covariance and hard assignment.

    1. GMM provides a density estimate, K-Means doesn't.

    Limitations: sensitive to initialization, can converge to local optima, struggles in high dimensions. Model selection: use BIC to choose K.