Distance Metrics 距离度量
源自 http://www.mathworks.cn/cn/help/stats/classification-using-nearest-neighbors.html
另可参考:
blog.sciencenet.cn/blog-531885-589056.html
www.dearopinion.com/tags/聚类
对于mx * n 数据矩阵X, 可视为 mx (1-by-n)个行向量x1,x2,..., xmx, 而my * n数据矩阵Y,可视为 my (1-by-n)个行向量y1, y2,...,ymy, 矢量xs和 yt 之间不同的距离有如下定义:
- Euclidean distance 欧氏距离
欧氏距离是闵氏距离在p = 2时的特殊情况.
-
Standardized Euclidean distance 标准化欧氏距离
其中V是n*n的对角线矩阵,其第j个对角线元素是S(j)2,S是包括逆权值(inverse weights)的矢量。
- Mahalanobis distance 马氏距离
其中C是协方差矩阵.
- City block metric 城市区块距离(曼哈顿距离)
城市区块距离是闵氏距离在p = 1时的特殊情况.
- Minkowski metric 闵
可 夫 斯 基 距 离
-
Chebychev distance 切比雪夫距离
切比雪夫距离是闵氏距离在p =∞时的特殊情况.
-
Cosine distance 余弦角距离
-
Correlation distance 相关距离
其中
以及
-
Hamming distance 汉明距离
-
Jaccard distance 杰卡德距离
-
Spearman distance 斯皮尔曼距离
其中
欢迎来到我的CSDN博客:http://blog.csdn.net/anshan1984/