首页IT科技欧几里德定理(机器学习中的数学——距离定义(一):欧几里得距离(Euclidean Distance))

欧几里德定理(机器学习中的数学——距离定义(一):欧几里得距离(Euclidean Distance))

时间2025-04-28 15:18:35分类IT科技浏览3939
导读:分类目录:《机器学习中的数学》总目录...

分类目录:《机器学习中的数学》总目录

相关文章:

· 距离定义:基础知识

· 距离定义(一):欧几里得距离(Euclidean Distance)

· 距离定义(二):曼哈顿距离(Manhattan Distance)

· 距离定义(三):闵可夫斯基距离(Minkowski Distance)

· 距离定义(四):切比雪夫距离(Chebyshev Distance)

· 距离定义(五):标准化的欧几里得距离(Standardized Euclidean Distance)

· 距离定义(六):马氏距离(Mahalanobis Distance)

· 距离定义(七):兰氏距离(Lance and Williams Distance)/堪培拉距离(Canberra Distance)

· 距离定义(八):余弦距离(Cosine Distance)

· 距离定义(九):测地距离(Geodesic Distance)

· 距离定义(十): 布雷柯蒂斯距离(Bray Curtis Distance)

· 距离定义(十一):汉明距离(Hamming Distance)

· 距离定义(十二):编辑距离(Edit Distance          ,Levenshtein Distance)

· 距离定义(十三):杰卡德距离(Jaccard Distance)和杰卡德相似系数(Jaccard Similarity Coefficient)

· 距离定义(十四):Ochiia系数(Ochiia Coefficient)

· 距离定义(十五):Dice系数(Dice Coefficient)

· 距离定义(十六):豪斯多夫距离(Hausdorff Distance)

· 距离定义(十七):皮尔逊相关系数(Pearson Correlation)

· 距离定义(十八):卡方距离(Chi-square Measure)

· 距离定义(十九):交叉熵(Cross Entropy)

· 距离定义(二十):相对熵(Relative Entropy)/KL散度(Kullback-Leibler Divergence)

· 距离定义(二十一):JS散度(Jensen–Shannon Divergence)

· 距离定义(二十二):海林格距离(Hellinger Distance)

· 距离定义(二十三):α-散度(α-Divergence)

· 距离定义(二十四):F-散度(F-Divergence)

· 距离定义(二十五):布雷格曼散度(Bregman Divergence)

· 距离定义(二十六):Wasserstein距离(Wasserstei Distance)/EM距离(Earth-Mover Distance)

· 距离定义(二十七):巴氏距离(Bhattacharyya Distance)

· 距离定义(二十八):最大均值差异(Maximum Mean Discrepancy, MMD)

· 距离定义(二十九):点间互信息(Pointwise Mutual Information, PMI)

欧几里得距离或欧几里得度量是欧几里得空间中两点间的即直线距离          。使用这个距离                  ,欧氏空间成为度量空间     ,相关联的范数称为欧几里得范数                  。

n

n

n

维空间中的欧几里得距离:

d

(

x

,

y

)

=

i

=

1

n

(

x

i

y

i

)

2

=

(

x

1

y

1

)

2

+

(

x

2

y

2

)

2

+

+

(

x

n

y

n

)

2

d(x, y)=\sqrt{\sum_{i=1}^n(x_i-y_i)^2}=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2+\cdots+(x_n-y_n)^2}

d(x,y)=i=1n(xiyi)2=(x1y1)2+(x2y2)2++(xnyn)2

2

2

2

维空间中的欧几里得距离:

d

(

x

,

y

)

=

(

x

1

y

1

)

2

+

(

x

2

y

2

)

2

d(x, y)=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2}

d(x,y)=(x1y1)2+(x2y2)2

下面我们来看一下欧几里得距离的Python实现:

def EuclideanDistance(x, y): import numpy as np x = np.array(x) y = np.array(y) return np.sqrt(np.sum(np.square(x-y)))

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
ie浏览器怎么清除保存的登录账号(如何清理IE浏览器的鼠标右键菜单?) 微信小程序调用地图接口(微信小程序解决view点击事件穿透地图map触发markertap)