I clustered normalized data using k-means. I used different similarity matrices like Euclidean, Manhattan and Cosine, and got a negative value for the Dunn Index when I used Cosine similarity. I have read that the value of the Dunn Index ranges from 0 to infinity. Is this correct to use Cosine Similarity to compute the Dunn index?
I have used this implementation of Dunn Index.
Euclidean and Manhattan are distances. They can be used to measure similarity, but they satisfy the requirements for a distance. Most importantly, a negative distance doesn’t exist. 0 means identical, and the larger the value, the less similar they are.
Cosine similarity is defined as the cosine of the angle between two vectors. Two parallel vectors have a similarity of 1, and the larger the difference in angle, the lower the similarity. If the two vectors are opposite, the cosine similarity is -1.
Thus, cosine similarity is not a distance. And therefore you cannot use it where a distance is required, such as computing the Dunn Index.