MachineLearning/gmm library
🔔 Gaussian Mixture Model (Expectation-Maximization)
A compact, well-documented GMM implementation using EM with diagonal
covariance support and simple regularization. Returns weights, means and
covariances and provides score and predict helpers.
Contract:
- Input: X (n x m), number of components k.
- Output: component weights, means, covariances.
- Error: throws ArgumentError on invalid shapes.
Time Complexity: O(n * k * iters * m) Space Complexity: O(k * m + n * k)