Although the last application was a pretty creative use of k-means, we can do better still. We have previously discussed k-means in the context of unsupervised learning, where we tried to discover some hidden structure in the data.
However, doesn't the same concept apply to most classification tasks? Let's say our task was to classify handwritten digits. Don't most zeros look similar, if not the same? And don't all zeros look categorically different from all possible ones? Isn't this exactly the kind of hidden structure we set out to discover with unsupervised learning? Doesn't this mean we could use clustering for classification as well?
Let's find out together. In this section, we will attempt to use k-means to try and classify handwritten digits. In other words, we will try to identify similar digits...