1

Cosine distance is a term often used for the complement in positive space, that is: ${\displaystyle D_{C}(A,B)=1-S_{C}(A,B)} D_{C}(A,B)=1-S_{C}(A,B)$. It is important to note, however, that this is not a proper distance metric as it does not have the triangle inequality property and it violates the coincidence axiom; to repair the triangle inequality property while maintaining the same ordering, it is necessary to convert to angular distance (see below.) Wiki Reference

I like to get the intuition of how violating triangle inequality make it a bad metric.

NewBeeee
  • 335
  • 1
  • 5
  • 8
  • 4
    Violating the triangle inequality doesn't make it a *bad* distance metric - it makes it "not a proper distance metric" at all! By definition, a metric must satisfy the triangle inequality (in addition to a few others) https://en.wikipedia.org/wiki/Metric_(mathematics). Whether or not its good or bad depends on your use-case. – ilanman Oct 04 '16 at 23:31
  • 1
    "Cosine distance" 1-cos is simply a squared euclidean distance (for unit-normalized vectors). _Squared_ euclidean distance violates triangular ineqiality. See this thread http://stats.stackexchange.com/q/135171/3277 about "correlation distances" - almost everything said there is true for cosine similarity too. – ttnphns Oct 05 '16 at 00:52

0 Answers0