Initial Kmeans implementation