I used the following code to perform clustering of a dataset in R.
distMatrix1 <- dist(sample2, method="cosine")
km<-kmeans(distMatrix1,3)
I have got some questions, them being
1. When the distance matrix is created it is an N*N matrix, so is the average of each row fed to kmeans function in R.
2. How are the cluster centroids calculated in this case, does clustering happen using Euclidean distances or does it happen using cosine dot product formula?
3. What is the significance of the clusters obtained? Do the entities which lie in the same cluster behave similarly?
- When the distance matrix is created it is an N*N matrix, so is the average of each row fed to kmeans function in R.
- How are the cluster centroids calculated in this case, does clustering happen using Euclidean distances or does it happen using cosine dot product formula?
- What is the significance of the clusters obtained? Do the entities which lie in the same cluster behave similarly?