知识卡片

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

向量相似度不等于距离

理解等级:中级

most_similar返回的分数通常用于表达余弦相似度,应按大者更近解释,不能直接叫越小越好距离。正负词组合、输入向量归一方式与候选排除会影响答案;相同词表和模型也需遵守具体接口约定。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      The gensim.KeyedVectors.most_similar() method provides an efficient way to find the nearest neighbors for any given word vector. The keyword argument positive takes a list of the vectors to be added together, similar to the soccer team example from the beginning of this chapter. Similarly, you can use the negative argument for subtraction and to exclude unrelated terms. The argument topn determines how many related terms

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第06章《用词嵌入推理》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-6.html) - 结论依据:摘录中关于向量相似度不等于距离的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:The gensim.KeyedVectors.most_similar() method provides an efficient way to find the nearest neighbors for any given word vector. The keyword argument positive takes a list of the vectors to be added together, similar to the soccer team example from the beginning of this chapter. Similarly, you can use the negative argument for subtraction and to exclude unrelated terms. The argument topn determines how many related terms