September 2019
Intermediate to advanced
420 pages
10h 29m
English
Although mathematicians have proved that the expectation-maximization step improves the result in each step, there is still no guarantee that, in the end, we will find the global best solution. For example, if we use a different random seed in our simple example (such as using seed 10 instead of 5), we suddenly get very poor results:
In [9]: centers, labels = find_clusters(X, 4, rseed=10)... plt.scatter(X[:, 0], X[:, 1], c=labels, s=100, cmap='viridis');
This will generate the following diagram:

The preceding diagram shows an example of k-means missing the global optimum. What happened? ...
Read now
Unlock full access