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版)
统计机器学习
199
6-2:将表6-1中的房屋所有权因子数据表示为数值型虚拟变量
OWNS_WITH_MORTGAGE OWNS_WITHOUT_MORTGAGE OTHER RENT
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
0 0 0 1
0 0 0 1
在线性回归和逻辑回归中,独热编码会带来多重共线性问题,参见
4.5.2
节。
在这种情况下,可以省略一个虚拟变量(它的值可以根据其他虚拟变量的值
推导出来)。对于
KNN
和本书中讨论的其他方法来说,不存在这个问题。
6.1.4
 标准化
归一化
z
分数
在进行测量时,我们通常关心的不是“有多少”,而是关心“与平均水平有多大不同”。
准化
(也称为
归一化
)通过减去均值再除以标准差,将所有变量转换为同一尺度,这样,
我们就可以保证某个变量不会单纯地因为它的原始测量尺度而对模型造成过度的影响:
z
xx
s
=
这种转换的结果通常称为
z
分数,这样测量单位就可以统一称为是“距离均值的标准差
数量”。
统计学中的
归一化
normalization
)不要与
数据库规范化
database normalization
相混淆,数据库规范化是指除去数据库中的冗余数据并对数据依赖进行
校验。
对于
KNN
和其他一些方法(例如主成分分析和聚类)来说,在应用之前必须考虑对数据
进行标准化。为了说明这一点,我们在贷款数据上应用
KNN
方法
,使用的变量包括
dti
payment_inc_ratio
(参见
6.1.1
节),以及另外两个变量:
revol_bal
,申请人的循环贷
款总额,以美元为单位; ...
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