metric using averaged centroid