// calcute centroid for each cluster function recalculateCentroids(clusters){ // YOUR CODE }