Clustering data using the k-means algorithm