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 面向数据科学家的实用统计学
第 5 章
分类
数据科学家经常会遇到需要自动做出决策的问题。例如,一封电子邮件是否试图进行钓鱼
式攻击?一名客户是否会流失?一位网络用户是否会点击一个广告?这些问题都可以归为
分类
问题。分类可能是最重要的预测形式,其目标是预测一个记录值是
0
还是
1
(钓鱼式
攻击或非钓鱼式攻击,客户会流失或者不会流失,用户会点击或者不会点击),或者在某
些情况下是预测类别之一(例如,
Gmail
就将收件箱中的邮件分为“主要”“社交”“促销”
和“论坛”类)。
在很多情况下,我们需要的不仅仅是简单的二分类,还需要预测一个实例属于某个类的
概率。
大多数算法并非只是让模型简单地指定一个二分类,而是可以返回属于感兴趣的类的概率
(或倾向)。事实上,在使用
R
实现逻辑回归时,默认输出是对数几率形式的,必须转换为
倾向分值,然后才能使用一个滑动的截止值将倾向分值转换为决策。通用方法如下。
(1)
对感兴趣的类确定一个截止概率值。超过此值,就可以认为记录属于该类。
(2)
估计任何模型中一个记录属于我们感兴趣的类的概率。
(3)
如果该概率值大于所确定的截止概率值,那么可以将新记录指定为感兴趣的类。
截止概率越高,被预测为
1
(即属于感兴趣的类)的记录越少。反之,截止概率越低,被
预测为
1
的记录越多。
本章将介绍一些用于分类和估计倾向性的重要方法。更多关于分类和数值预测的方法,将
在下一章中介绍。
134
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的智能文本分析

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

Python数据处理

Jacqueline Kazil, Katharine Jarmul
精通機器學習

精通機器學習

Aurélien Géron
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普

Publisher Resources

ISBN: 9787115493668