ristretto
ristretto copied to clipboard
Weighted PCA
All observations form a matrix X where each row is one observation and each column is one feature. Each observation also has a weight wi, which means the observation has occurred for wi times. For example, a weight of 2 means the same observation actually occurs for twice.
Can I do weighted sparse PCA by the following method?
- Center each column of X by weighted average with wi as weights.
- Form matrix Y by multiplying each row of X by square root of wi.
- Calculate (robust) sparse PCA of Y with ristretto, which provides matrices A and B.
- The matrix X is approximately XBAT, where AT is transpose of A.
Thank you.