Skip to main content

Module gmm

Module gmm 

Source
Expand description

Gaussian Mixture Models via EM (PRML ch 9.2, ISL ch 12) — diagonal-covariance mixture, the standard robust GMM. Means are seeded by k-means (reusing super::kmeans); the EM loop alternates responsibilities (E) and weighted moment updates (M) and is guaranteed to increase the log-likelihood each step.

The diagonal-covariance assumption (per-feature variance, no cross terms) is stated explicitly, not hidden — it is the common, numerically stable GMM and avoids singular full covariances on small data. A variance floor prevents component collapse. Kernel-class Reduction (the per-point responsibilities).

Structs§

GmmModel
A fitted diagonal-covariance Gaussian mixture.

Functions§

fit
Fit a k-component diagonal GMM by EM. Fails closed: InvalidDimension, InsufficientData (k == 0 or k > n), NotConverged.