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 面向数据科学家的实用统计学
分类
|
135
两个以上的类别
?
绝大多数问题只涉及二元响应变量。但是在一些分类问题中,响应变量有两个以上的
结果。例如,当客户的订阅合同满一年后,可能会有三个结果:客户离开或“流失”
(
Y
= 2
),改为按月订阅合同(
Y
= 1
),签署新的长期合同(
Y
= 0
)。我们的目标是预测
Y
=
j
,其中
j
= 0
、
1
或
2
。本章介绍的大部分分类方法,都可以直接或经过小的修改后
用于具有两个以上结果的响应变量。即使是在具有两个以上结果的情况下,通常也可
以使用条件概率,将问题重写为一系列二分类问题。例如,为了预测订阅合同的结果,
我们可以将该问题转换为两个二分类预测问题。
•
预测
Y
= 0
还是
Y
> 0
。
•
如果
Y
> 0
,预测
Y
= 1
还是
Y
= 2
。
将该问题分解为两种情况是一种合理的做法。首先判断客户是否会流失。如果客户没
有流失,那么判断客户将会选择哪种类型的合同。从模型拟合的角度来看,通常最好
将多分类问题转换为一系列二分类问题,尤其是在一个类别比其他类别更为普遍的情
况下。
5.1
 朴素贝叶斯算法
朴素贝叶斯算法使用在给定输出情况下观测到预测因子值的概率,估计给定一组预测因子
的值时观测到结果
Y
=
i
的概率。
1
主要术语
条件概率
在给定另一个事件(比如
Y
=
i
)的条件下,观测到某个事件(比如
X
=
i
)的概
率,记作
P
(
X
i
|
Y
i
)
。
后验概率
在给定预测因子的情况下,出现某一结果的概率(后验概率不同于结果的
先验概
率
,后者并未考虑预测因子的信息)。
为了理解贝叶斯分类,我们从设想“非朴素”的贝叶斯分类开始。对于每个要分类的记录: ...
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