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版)
208
6
假设我们有一个响应变量
Y
和含有
P
个预测变量
X
j
的集合,
j
=
1,
,
P
。对于分区
A
中的
记录,递归分割会找到将分区
A
划分为两个子分区的最佳方式。
1.
对于每个预测变量
X
j
a.
对于
X
j
的每个值
s
j
i.
A
中的记录分割为两部分
,其中
X
j
的值小于
s
j
的记录在一个分区,其余
X
j
的值
大于等于
s
j
的记录在另一个分区。
ii.
测量出
A
的每个子分区中的类别的同质性。
b.
选择能使分区内类别同质性最大的
s
j
的值。
2.
选择出能使分区内类别同质性最大的变量
X
j
和分割值
s
j
下面是递归环节。
1.
A
进行初始化,即将整个数据集作为
A
2.
应用分割算法将
A
分割为两个子分区
A
1
A
2
3.
在子分区
A
1
A
2
上重复第
2
步。
4.
当进一步分区不能提高分区同质性时,算法结束。
最终的结果是一些数据分区,就像图
6-4
中那样
,只不过是
P
维的。按照分区中响应变量
少数服从多数的投票结果,每个分区还预测了
0
1
的结果。
除了预测
0/1
二元结果,树模型还可以根据分区中
0
1
的数量生成一个概率
估计。这种估计只是简单地用分区中
0
1
的数量除以分区中的观测总数。
1
Prob(1)Y ==
ݴ൶ዐ ڦຕଉ
ݴ൶ඹଉ
估计出的
Prob(
Y
=
1)
可以转换为一个二元决策。例如,如果
Prob(
Y
=
1) > 0.5
就将估计值设置为
1
6.2.3
 测量同质性或不纯度
树模型递归地创建数据分区
A
(记录集合),这种分区可以预测
Y
=
1
Y
=
0
的结果。从
上面的算法可知,我们需要一种测量分区中同质性(也称为 ...
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