Skip to Content
机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
book

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

by Aurélien Géron
October 2020
Intermediate to advanced
693 pages
16h 26m
Chinese
China Machine Press
Content preview from 机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
193
第 8 章
降维
许多机器学习问题涉及每个训练实例的成千上万甚至数百万个特征。正如我们将看到的
那样,所有这些特征不仅使训练变得极其缓慢,而且还会使找到好的解决方案变得更加
困难。这个问题通常称为维度的诅咒。
幸运的是,在实际问题中,通常可以大大减少特征的数量,从而将棘手的问题转变为
易于解决的问题。例如,考虑 MNIST 图像(在第 3 章中介绍):图像边界上的像素几
乎都是白色,因此你可以从训练集中完全删除这些像素而不会丢失太多信息。图 7-6
确认了这些像素对于分类任务而言完全不重要。另外,两个相邻的像素通常是高度相
关的,如果将它们合并为一个像素(例如,通过取两个像素的平均值),不会丢失太多
信息。
数据降维确实会丢失一些信息(就好比将图像压缩为 JPEG 会降低其质量
一样),所以,它虽然能够加速训练,但是也会轻微降低系统性能。同时它
也让流水线更为复杂,维护难度上升。因此,如果训练太慢,你首先应该
尝试的还是继续使用原始数据,然后再考虑数据降维。不过在某些情况下,
降低训练数据的维度可能会滤除掉一些不必要的噪声和细节,从而导致性
能更好(但通常来说不会,它只会加速训练)。
除了加快训练,降维对于数据可视化(或称
DataViz
)也非常有用。将维度降到两个(或
三个),就可以在图形上绘制出高维训练集,通过视觉来检测模式,常常可以获得一些十
分重要的洞察,比如聚类。此外,DataViz 对于把你的结论传达给非数据科学家至关重
要,尤其是将使用你的结果的决策者。
本章将探讨维度的诅咒,简要介绍高维空间中发生的事情 ...
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

算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111665977