The choice of k, which is the number of clusters to partition a set of data in k-means clustering, depends on the size of the dataset. It can be set by a subject matter expert or constraints of the business. It should always be as large as your computer system can handle. It has a maximum of 5.