EM algorithm for Gaussian mixtures

The complete algorithm (which is fully described in Mastering Machine Learning Algorithms, by Bonaccorso G., Packt Publishing, 2018) is a little more complex than k-means, and it requires deeper mathematical knowledge. As the scope of this book is more practical, we are only discussing the main steps, without providing formal evidence.

Let's start by considering a dataset, X, containing n samples:

Given k distributions, we need to find the weights, wj, and the parameters of each Gaussian j, Σj), with the following condition:

This last condition is necessary to maintain consistency with the laws of probability. ...

Get Hands-On Unsupervised Learning with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.