How do I convert between a measure of similarity and a measure of difference (distance)?

前端 未结 8 1734
悲&欢浪女
悲&欢浪女 2021-02-02 01:57

Is there a general way to convert between a measure of similarity and a measure of distance?

Consider a similarity measure like the number of 2-grams that two strings ha

8条回答
  •  无人共我
    2021-02-02 02:26

    Doing 1/similarity is not going to keep the properties of the distribution.

    the best way is distance (a->b) = highest similarity - similarity (a->b). with highest similarity being the similarity with the biggest value. You hence flip your distribution. the highest similarity becomes 0 etc

提交回复
热议问题