The first clustering technique that we will cover here, and probably the most well-known clustering technique, is called k-means clustering, or just k-means. k-means is an iterative method in which data points are clustered around cluster centroids that are adjusted during each iteration. The technique is relatively easy to grasp, but there are some related subtleties that are easy to miss. We will make sure to highlight these as we explore the technique.
As k-means clustering is so easy to implement, there are many proof-of-concept implementations of the algorithm in Go. You can find these by searching for k-means on this link (https://golanglibs.com/top?q=kmeans). However, we will utilize a implementation that is recent and fairly straightforward to use, github.com/mash/gokmeans.