I am using Kmeans clustering on my data After training the model, I want to calculate the distance between Test Data points and CLuster centers.
How do I do it?
My code is like below:
model = KMeans(clusters=2, random_state=42)
# get centroids
centroids = model.cluster_centers_
But I'm not sure how to use those centroids to calculate the distances for new data point