I want to find the intra and inter cluster distances between K Means clusters. Please suggest me a method for this purpose. I am using R for this purpose.
Evaluate the squared euclidean distance between all data points and the centroids AB, CD. For example, the distance between A(2,3) and AB (4,2) may be calculated using s = (2–4)2 + (3–2)2.
Have a look: https://towardsdatascience.com/k-means-clustering-for-beginners-2dc7b2994a4
Do Euclidean for intra and find a local centroid (say..1...k) and again calculate the same for inter data and create global centroid (say k1....n1). Fine grain again to achieve maximum results.
For intra cluster distance use the sum of squared euclidean distance between the centroid and the other members of the cluster. For inter cluster distance you can use the distance between the clusters centroids.