主成分分析-PCA

why 主成分分析?


线性回归

y=Xβ+ϵ

假设 X={X1,,Xp} 相互独立, ϵN(0,σ2)
实际应用中, {X1,,Xp} 未必相互独立,可能是线性相关的。违背线性模型基本假设。


What is 主成分分析?


简单的说就是通过对 X={X1,,Xp} 进行线性组合,得到不相关的 Xc={Xc1,,Xcq},qp

维基百科的定义:

  • Principal component analysis (PCA) uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of linearly uncorrelated variables called principal components.
  • The number of principal components is less than or equal to the number of original variables.
  • The first principal component has the largest possible variance
  • each succeeding component in turn has the highest variance possible under the constraint that it is orthogonal to the preceding components.
  • The resulting vectors are an uncorrelated orthogonal basis set.

看图说话:

PCA

假设 p=2 , 解释变量有2个,而且从图中可以看出,两个变量之间高度相关。
所以建立新的坐标系,使得在新的坐标系下,两变量线性无关。


How 主成分分析?


如何找到主成分?

假设对原数据进行线性变换:

Xc=WTX,s.t.W=1

第一主成分

X(1)c=argmax{var(Xc1),,var(Xcq)}

计算

Var(Xc)=WTXXTW

从而

X(1)c=λmax

λmax XXT 的最大特征值。


利用主成分分析方法进行机器学习分类,关注的不再是“主成分是谁?”
而是“如何找到变换W?”

假设有 k 类, X|Y=iN(μi,Σi), 那么 Xc|Y=iN(WTμi,WTΣiW)i=1,,k. 不妨假设 k=2

目标:寻找W极大化

L(W)=(WTμ1WTμ2)T(WTμ1WTμ2)

s.t.
WT(Σ1+Σ2)W=1

直接求解,可得

W(Σ1+Σ2)1(μ1μ2)

更多参考文献:
https://onlinecourses.science.psu.edu/stat505/node/49
https://www.cs.princeton.edu/picasso/mats/PCA-Tutorial-Intuition_jp.pdf

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值