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版)
统计机器学习
|
213
1.
开发一个预测模型,并记录该模型对一个给定数据集的预测结果。
2.
在同样的数据上继续开发多个模型。
3.
对于每条要进行预测的记录
,都使用多个模型预测结果的平均(可以是加权平均,也可
以按照少数服从多数原则进行投票)。
集成方法在决策树中得到了最为系统也最为有效的应用。集成树模型的功能特别强大,按
照这种方法建立预测模型,几乎不费吹灰之力就能产生非常良好的效果。
除了这种简单的集成方法之外,集成模型还有两种主要的变体:装袋法与提升方法。在集
成树模型的情境下,这两种方法被称为
随机森林
模型与
提升树
模型。本节主要介绍装袋
法,提升方法将在
6.4
节进行介绍。
6.3.1
 装袋法
装袋(
bagging
)表示“
Bootstrap aggregating
”,这种方法是
1994
年由
Leo Breiman
提出的。
假设我们有一个响应变量
Y
和
P
个预测变量
X
=
X
1
,
X
2
,
…
,
X
p
,并有
N
条记录。
装袋与基本的集成算法很相似,不过它不是在同一数据上拟合不同模型,而是使用
Bootstrap
重抽样去拟合每个新模型。下面是更加正式的算法描述。
1.
初始化要拟合的模型数量
M
,以及要使用的记录数量
n
(
n
<
N
),并设置迭代计数器
m
=
1
。
2.
从训练数据中抽出一个有
n
条记录的
Bootstrap
重抽样
(使用有放回方式),建立一个子
样本
Y
m
和袋子
X
m
。
3.
使用
Y
m
和
X
m
训练一个模型,创建一个决策规则集合
ˆ
()
m
fX
。
4.
将模型计数器加
1
,即
m
=
m
+ 1
,如果
m
≤
M
,就返回第
2
步。
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