CosineDistance
CosineDistance[u,v]
给出向量 u 和 v 之间的角余弦位距.
更多信息
- CosineDistance[u,v] 等价于 1-u.v*/(Norm[u]Norm[v]). »
范例
打开所有单元 关闭所有单元基本范例 (2)
范围 (2)
应用 (1)
属性和关系 (3)
CosineDistance[{a, b, c}, {x, y, z}]1 - {a, b, c}.Conjugate[{x, y, z}] / (Norm[{a, b, c}]Norm[{x, y, z}])u = {a, b, c};
v = {x, y, z};scale = (EuclideanDistance[u, {0, 0, 0}]EuclideanDistance[v, {0, 0, 0}])CosineDistance[u, v] == 1 - u.Conjugate[v] / scale向量的 CosineDistance 进行距离为其均值的平移后等价于 CorrelationDistance:
u = {a, b, c};
v = {x, y, z};CosineDistance[u - Mean[u], v - Mean[v]] == CorrelationDistance[u, v]技术笔记
-
▪
- 把数据划分为聚类
相关指南
-
▪
- 距离和相似度测量
文本
Wolfram Research (2007),CosineDistance,Wolfram 语言函数,https://reference.wolfram.com/language/ref/CosineDistance.html.
CMS
Wolfram 语言. 2007. "CosineDistance." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/CosineDistance.html.
APA
Wolfram 语言. (2007). CosineDistance. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/CosineDistance.html 年
BibTeX
@misc{reference.wolfram_2026_cosinedistance, author="Wolfram Research", title="{CosineDistance}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/CosineDistance.html}", note=[Accessed: 11-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_cosinedistance, organization={Wolfram Research}, title={CosineDistance}, year={2007}, url={https://reference.wolfram.com/language/ref/CosineDistance.html}, note=[Accessed: 11-September-2026]}