知识卡片
欧氏距离是差向量的范数
对(1,0)和(2,1),差为(1,1)或其相反数,欧氏距离为√2约1.414。差向量方向不影响范数,距离也不是范数的倒数;检查一维与二维小例,有助发现公式或图示数值是否互相一致。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
To subtract Vec1 from Vec2, you could use the NumPy expression v2 - v1. Substituting the 2D vector values for v1 and v2, you get (2, 1) - (1, 0), which gives (-1, -1) as the vector distance between those two vectors. The length of that difference vector is the distance between the two vectors v1 and v2, and the Pythagorean formula gives you a
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第03章《词频与逆文档频率向量》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-3.html)
- 结论依据:摘录中关于欧氏距离是差向量的范数的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:To subtract Vec1 from Vec2, you could use the NumPy expression v2 - v1. Substituting the 2D vector values for v1 and v2, you get (2, 1) - (1, 0), which gives (-1, -1) as the vector distance between those two vectors. The length of that difference vector is the distance between the two vectors v1 and v2, and the Pythagorean formula gives you a