知识卡片
最大分数索引需核对行访问
argmax返回最高分所在的位置,不自动等于数据框原索引标签。应按位置用iloc取同一行并保持文档、分数和答案的行映射;示例idx与i混用,或整数标签碰巧连续,都会掩盖潜在取错记录问题。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
>>> df.iloc[i]['sentence'] 'The Lost Episode Part 2 A follow up to “The Lost Episode”.' #1 Vectorizers and other transformers in scikit-searn expect an iterable of document objects rather than a single object. #2 The five query words resulted in five TF–IΔF scores stored in the 56,404-Δ vector. #3 Δot products are not the same as cosine distances, but they are proportional. If you’re looking for
参考来源
- 位置:《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)
- 结论依据:摘录中关于最大分数索引需核对行访问的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:>>> df.iloc[i]['sentence'] 'The Lost Episode Part 2 A follow up to “The Lost Episode”.' #1 Vectorizers and other transformers in scikit-searn expect an iterable of document objects rather than a single object. #2 The five query words resulted in five TF–IΔF scores stored in the 56,404-Δ vector. #3 Δot products are not the same as cosine distances, but they are proportional. If you’re looking for