Is Triangle inequality necessary for kmeans?

后端 未结 2 478
灰色年华
灰色年华 2021-02-06 16:40

I wonder if Triangle inequality is necessary for the distance measure used in kmeans.

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-06 17:36

    Well, classical kmeans is defined on Euclidean space with L2 distance, so you get triangle inequality automatically from that (triangle inequality is part of how a distance/metric is defined). If you are using a non-euclidean metric, you would need to define what is the meaning of the "mean", amongst other things.

    If you don't have triangle inequality, it means that two points could be very far from each other, but both can be close to a third point. You need to think how you would like to interpret this case.

    Having said all that, I have in the past used average linkage hierarchical clustering with a distance measure that did not fulfill triangle inequality amongst other things, and it worked great for my needs.

提交回复
热议问题