ristretto icon indicating copy to clipboard operation
ristretto copied to clipboard

Weighted PCA

Open hamster-on-wheels opened this issue 7 years ago • 0 comments

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?

  1. Center each column of X by weighted average with wi as weights.
  2. Form matrix Y by multiplying each row of X by square root of wi.
  3. Calculate (robust) sparse PCA of Y with ristretto, which provides matrices A and B.
  4. The matrix X is approximately XBAT, where AT is transpose of A.

Thank you.

hamster-on-wheels avatar Jan 09 '19 16:01 hamster-on-wheels