Skip to main content
edited tags
Link
ttnphns
  • 58.8k
  • 53
  • 287
  • 512
deleted 6 characters in body
Source Link

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?
  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?

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?

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?
edited title
Link
ttnphns
  • 58.8k
  • 53
  • 287
  • 512

Significance of A question on cosine similarity & k-means

Source Link
Loading