知识卡片
测试目标不能只保留容易的标签
为每个姓名只选多数标签作为测试真值,评估的是姓名多数类别任务,而不是全部登记个体。若训练仍含两类记录,训练与测试目标也不一致;应显式说明所衡量对象,不能称删冲突后理论可达100%就代表问题已解决。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 神经网络基础
原书出处 · 1 处
- · 查看原书依据
>>> df_most_common = {} #1 >>> for name, group in df.groupby('name'): ... row_dict = group.iloc[group['count'].argmax()].to_dict() #2 ... df_most_common[(name, row_dict['sex'])] = row_dict >>> df_most_common = pd.DataFrame(df_most_common).T #3 #1 The fastest way to incrementally build a Series is with a dict. #2 If there are two rows with the same name (but different sex), use the row with the higher count. #3 A ΔataFrame created from a
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第05章《神经网络基础》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-5.html)
- 结论依据:摘录中关于测试目标不能只保留容易的标签的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:>>> df_most_common = {} #1 >>> for name, group in df.groupby('name'): ... row_dict = group.iloc[group['count'].argmax()].to_dict() #2 ... df_most_common[(name, row_dict['sex'])] = row_dict >>> df_most_common = pd.DataFrame(df_most_common).T #3 #1 The fastest way to incrementally build a Series is with a dict. #2 If there are two rows with the same name (but different sex), use the row with the higher count. #3 A ΔataFrame created from a