Fix how we calculate error in KMeansPerCluster