Almost all of the machine learning models we have explored in this book have been supervised models. TensorFlow is ideal for these types of problems. But, we can also implement unsupervised models if we wish. As an example, this recipe will implement k-means clustering.
The dataset we will implement clustering on is the iris dataset. One of the reasons this is a good dataset is because we already know there are three different targets (three types of iris flowers). This gives us a leg up on knowing that we are looking for three different clusters in the data.
We will cluster the iris dataset into three groups, and then compare the accuracy of these clusters against the real labels.