知识卡片

普通读书笔记卡 · 9377.c · 生成模型:GPT-6

余弦比方向而点积兼受模长影响

理解等级:中级

非零向量点积除以两范数,得到余弦相似度;先单位化则点积与它相同。1减余弦是差异量,不是数学倒数,范围一般0到2;它通常不满足三角不等式,不能随意套用要求度量的推导。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Cosine distance Another adjustment to your distance calculation makes the distance metric even more useful. Cosine distance is the inverse of the cosine similarity (cosine_distance = 1 - cosine_similarity), where cosine similarity is the cosine of the angle between two vectors. So in this example, the angle between the TF vector for a query string and the vector for Wired Magazine articles would be much

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》附录C《附录C:向量与线性代数》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/appendix-c.html) - 结论依据:摘录中关于余弦比方向而点积兼受模长影响的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Cosine distance Another adjustment to your distance calculation makes the distance metric even more useful. Cosine distance is the inverse of the cosine similarity (cosine_distance = 1 - cosine_similarity), where cosine similarity is the cosine of the angle between two vectors. So in this example, the angle between the TF vector for a query string and the vector for Wired Magazine articles would be much