Skip to Content
数据科学中的实用统计学(第2版)
book

数据科学中的实用统计学(第2版)

by Peter Bruce, Andrew Bruce, Peter Gedeck
October 2021
Intermediate to advanced
289 pages
8h 31m
Chinese
Posts & Telecom Press
Content preview from 数据科学中的实用统计学(第2版)
182
5
这里,行表示实际响应变量,列表示预测响应变量,但反过来也很常见,在
R
中广泛使用的
caret
包就是这样的。
5.4.2
 稀有类问题
在很多情况下,要预测的类别是不平衡的,某个类别会比另一个类别普遍得多,例如,正
当的保险索赔与欺诈性的保险索赔、网站浏览者与购买者。我们通常对稀有类(如欺诈性
索赔)更感兴趣,一般将其表示为
1
,而将更普遍的类表示为
0
。在典型的情形中
1
一般
更重要,如果将
1
错分类为
0
,那么造成的损失会比将
0
错分类为
1
更大
。例如,正确地
识别出欺诈性的保险索赔可以挽回大量金钱损失,但反过来说,如果正确地识别出非欺诈
索赔,那么节省的不过是仔细查看一下索赔文件的成本而已(如果索赔被标记为“欺诈”,
那么你就会这么做)。
在这种情况下,除非类别很容易分离,否则最准确的分类模型就是简单地将所有记录都分
类为
0
的模型
。例如,如果一个网上商店只有
0.1%
的浏览者最终会购买商品,那么一个
预测每个浏览者都会不购物就离开的模型的准确率就是
99.9%
,但
这样的模型没有什么用。
相反,我们更喜欢那种总体准确率低一点但易于找出购买者的模型,即使它将某些非购买
者错误分类。
5.4.3
 精确度
召回率和特异度
除了准确率之外,在评估分类模型时,还经常会使用其他几个更加微妙的指标。其中几个
指标在统计学中历史悠久,特别是在生物统计学中,会使用它们来描述诊断检验的预期效
果。
精确度
测量的是预测为正例结果的准确率(见图
5-5
)。
=
∑+
ኟ૩
৛ඓ܈
ኟ૩ ्ኟ
召回率
也称为
灵敏度
,它测量的是模型预测正例结果的能力,即模型正确识别出 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115569028