Distance Metrics 距离度量

来源:互联网 发布:ecs网络拓扑图图标 编辑:程序博客网 时间:2024/06/05 20:16

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,量xsyt 之间不同的距离有如下定义:

  • 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 斯皮尔曼距离

    其中

    • rsjxsj的秩,takenoverx1j,x2j,...xmx,j, 使用tiedrank计算.

    • rtjytj的秩,takenovery1j,y2j,...ymy,j,使用tiedrank计算.

    • rs andrt are thecoordinate-wise rank vectors ofxs and yt,i.e., rs =(rs1,rs2,...rsn)and rt =(rt1,rt2,...rtn).

欢迎来到我的CSDN博客:http://blog.csdn.net/anshan1984/

 

原创粉丝点击