Skip to Content
面向数据科学家的实用统计学
book

面向数据科学家的实用统计学

by Peter Bruce, Andrew Bruce
October 2018
Beginner to intermediate
238 pages
6h 32m
Chinese
Posts & Telecom Press
Content preview from 面向数据科学家的实用统计学
分类
|
153
离的。例如,如果只有
0.1%
的网店浏览者最终会选择购买,那么预测每个浏览者不购买
就离开的模型,其正确率可以达到
99.9%
。但是,这样的模型并没什么用处。相反,我们
会对一个能从浏览者中挑选出购买者的模型非常满意,尽管该模型可能总体上正确率并不
高,会将一些非购买者错误分类。
5.4.3
 准确率
、
召回率和特异性
除了正确率,我们常常还会使用其他一些更精细的度量去评估分类模型。一些度量在统计
学尤其是生物统计学中具有悠久的历史,可以描述诊断检验的预期性能。其中,
准确率
测
量了预测阳性结果的正确率,如图
5-5
所示。
准确率
TP
TP FP
∑
=
∑ + ∑
召回率
也称为
灵敏度
,它衡量了模型预测阳性结果的能力,即模型正确识别
1
的比例(如
图
5-5
所示)。“灵敏度”这一术语多用于生物统计学和医学诊断。而在机器学习领域中,
使用更多的是“召回率”。下面是召回率的计算公式。
召回率
TP
TP FN
∑
=
∑ + ∑
还有一个度量是
特异性
(
specificity
),它测量了模型预测阴性结果的能力。
特异性
TN
TN FN
∑
=
∑ + ∑
# 准确率
conf_mat[1,1]/sum(conf_mat[,1])
# 召回率
conf_mat[1,1]/sum(conf_mat[1,])
# 特异性
conf_mat[2,2]/sum(conf_mat[2,])
5.4.4
 
ROC
曲线
从上节的定义中可以看出,在召回率和特异性之间存在着权衡。捕获更多的
1
,通常意味
着有更多的
0
被错误地分类为
1
。一个理想的分类器,应该在对
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

精通機器學習

精通機器學習

Aurélien Géron
基于Python的智能文本分析

基于Python的智能文本分析

Benjamin Bengfort, Rebecca Bilbro, Tony Ojeda
Python数据处理

Python数据处理

Jacqueline Kazil, Katharine Jarmul

Publisher Resources

ISBN: 9787115493668