Nuts and Bolts of NumPy Optimization Part 2: Speed Up K-Means Clustering by 70x
In this part we'll see how to speed up an implementation of the k-means clustering algorithm by 70x using NumPy. We cover how to use cProfile to find bottlenecks in the code, and how to address them using vectorization.