V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
huzhikuizainali

PCA 降维后数据的协方差为什么变成 0?

  •  
  •   huzhikuizainali · Feb 10, 2022 · 1491 views
    This topic created in 1538 days ago, the information mentioned may be changed or developed.
    ![]( )
    Supplement 1  ·  Feb 10, 2022
    matlab 验证程序
    A=[1 1;3.04 0.64;3.41 2.12;3.95 4.54;4.62 5.92;6 6]; %将随机样本数据放进矩阵 A ,A 中的数据可以随意更改。协方差矩阵 B 总是对角阵
    [coeff,score,latent] = pca(A); %对矩阵 A 进行 PCA 处理
    B=cov(score(:,1),score(:,2)) %对 PCA 处理后的数据求协方差矩阵
    necomancer
        1
    necomancer  
       Mar 13, 2022
    但凡认真看本线代……

    PCA 的***定义***不就是找到一个酉矩阵 U 使得去中心样本(x-xmean)的协方差对角化么:U^T (x-xmean)(x-xmean)^T U = D? 你算变换后的坐标 y=U^T x 的协方差 (y-ymean)(y-ymean)^T 当然是对角矩阵 D 了。
    huzhikuizainali
        2
    huzhikuizainali  
    OP
       Mar 14, 2022
    @necomancer 谢谢回复。参考了其他书籍。已经学会了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5396 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 08:06 · PVG 16:06 · LAX 01:06 · JFK 04:06
    ♥ Do have faith in what you're doing.