Skip to Content
精通特征工程
book

精通特征工程

by Alice Zheng, Amanda Casari
April 2019
Intermediate to advanced
172 pages
4h 39m
Chinese
Posts & Telecom Press
Content preview from 精通特征工程
86
6
6.2.3
 主成分
第一种表示形式
结合公式
6-1
z
i
的定义,可以得到公式
6-6
中投影数据方差最大化的数学表示。(我们丢
弃了经验方差定义中的分母
n–
1
,因为它是个全局常量,对在何处达到最大值没有影响。)
公式
6-6
 主成分目标函数
2
w
1
n
T T
i
i=
=
ma
x(xw), ഄዐ ww
1
这里的限制条件强制
w
与自己的内积为
1
,这等价于
w
必须具有单位长度。这样做的原因
是我们只关心
w
的方向,不关心它的大小。
w
的大小是个不必要的自由度,所以我们可以
将它设定为任意值,从而除去它的影响。
6.2.4
 主成分
矩阵
-
向量表示形式
下面的步骤有点难度。公式
6-6
中的平方和项太笨重了,表示成矩阵
向量的形式会更简
洁。可以这样做吗?答案是肯定的。关键就在于平方和恒等式:多个项的平方和等于由这
些项组成的向量的范数的平方,也就是这个向量与它自己的内积。有了这个恒等式,就可
以将公式
6-6
重新表示为矩阵
向量形式,如公式
6-7
所示。
公式
6-7
 主成分目标函数,矩阵
向量形式
max
w
w
T
w
,其中
w
T
w
= 1
这种
PCA
表示形式更加清楚地呈现出了我们的目标:找到一个能使输出向量的范数最大
化的输入方向。是不是听起来很熟悉?答案就在于矩阵
X
奇异值分解
SVD
)。结果就
是,最优的
w
就是
X
的主要左奇异向量,也就是
X
T
X
的主特征向量。投影数据就称为原
始数据的主成分。
6.2.5
 主成分的通用解
这个过程是可重复的。一旦找到了第一个主成分,就可以重新运行公式
6-7
,只是要加上
一个附加条件,即新向量与前面找到的向量是正交的(见公式 ...
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

Publisher Resources

ISBN: 9787115509680