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版)
160
5
数值预测的其他方法。
超过两个类别
绝大多数的分类问题中只有一个二元响应变量,但某些分类问题的响应变量不止两个
可能的结果。例如,在客户的订阅合约到期时,会有三个可能结果:客户不再订阅
(流失,
Y
= 2
)、继续签订一份按月订阅的合约(
Y
= 1
),或者签订一份新的长期合约
Y
= 0
)。我们的目标是预测
Y
=
j
,其中
j
= 0
1
2
。本章介绍的多数分类方法可以
直接(或经过一些修改后)用于具有两个以上结果的响应变量。即使是在具有两个以
上结果的情况下,分类问题也可以通过条件概率转化为一系列二元分类问题。例如,
要预测合约的结果,只需要求解以下两个二元分类问题。
预测
Y
= 0
还是
Y
> 0
Y
> 0
时,预测
Y
= 1
还是
Y
= 2
在这个例子中,可以将问题分为两种情况:
(1)
客户是否流失;
(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

Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115569028