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 面向数据科学家的实用统计学
统计机器学习
|
169
偏差与方差的权衡
过平滑和过拟合之间的拉锯关系,正是
偏差与方差之间的权衡
的一个具体体
现。这一问题在统计模型拟合中普遍存在。方差是由于训练数据的选取而产
生的建模误差。也就是说,如果选择了不同的训练数据集,那么生成的模型
会有所差异。偏差是是由于未能正确识别潜在的现实场景而产生的建模误
差。如果只是添加更多的训练数据,偏差并不会消失。当一个灵活的模型产
生过拟合时,方差可能会增大。使用一个更简单的模型可以减小方差,但是
由于损失了对真实情况建模的灵活性,偏差可能会增大。处理这一权衡的一
种通用方法是使用“交叉验证”。具体内容,参见
4.2.3
节。
6.1.6
 
KNN
作为特征引擎
由于其简单性和直观的本质,
KNN
得到了广泛应用。但是,与其他更复杂的分类技术相
比,
KNN
本身在性能上并不具有竞争力。在实际的模型拟合中,可以将
KNN
作为一个阶
段性过程,用于向其他分类方法中添加“局部知识”。具体做法如下:
(1)
在数据上运行
KNN
,为每个记录生成一个分类(或是分类的拟概率);
(2)
将结果作为一个新特征添加到记录中,然后在生成的数据上运行另一种分类方法。这
样,我们使用了原始预测变量两次。
鉴于部分预测变量在上述过程中使用了两次,你可能会怀疑该过程是否会导致多重共线性
(参见
4.5.2
节)。这并不是问题,因为添加到第二阶段模型中的信息只是由数个近邻记录
获得的,因而是高度局部的,它们只会构成一种额外信息,而非冗余信息。
我们可以将阶段性地使用
KNN
看作集成学习的一种形式,在集成学习的过
程中同时使用了多种预测建模方法。也可以将其视为一种特征工程,目标是 ...
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