Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chap 16. PCA 中SVD解法中参数的问题 #58

Open
ChenGeng777 opened this issue Jul 11, 2021 · 0 comments
Open

Chap 16. PCA 中SVD解法中参数的问题 #58

ChenGeng777 opened this issue Jul 11, 2021 · 0 comments

Comments

@ChenGeng777
Copy link

numpy.linalg.svd(A) 中, 如果用多元随机变量的协方差的无偏样本对协方差矩阵C= Cov(X^T,X) = X^T*X/(n-1) 进行 SVD, A应该是中心化的X, 即
$$X = USV^h$$
$$C = VS U^h USV/(n-1) = V S^2 V^h $$

所以, 应该用 np.linalg.svd(X), 其中 X 做了中心化。实例中做标准化再 SVD 是用相关系数矩阵为标准做PCA。

相关资源参考: PCA 和 SVD 关系

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant