ML assignment 7 k-means - compute centroids