Clean up KMeans invocation