# Sparse PCA adjusted variance explained

In the original Sparse PCA paper

Sparse Principal Component Analysis ZOU, HASTIE, TIBSHIRANI

they describe a way to compute the adjusted variance explained by computing QR decomposition of the Z matrix (size n times k) where n is the number of observations and k is the low dimensional space. Then the adjusted variance is just trace(R^2).

I tried doing that for probabilistic sparse PCA that I implemented but it turns that the adj. variance explained is a very high number ~700. We know that it should be between 0 and 1, so probably I am missing some normalization constant. Does anyone have any idea on what could be going wrong or how to normalize.

My original data dimensions are 100*50 i.e. n=100, p=50 and k=10

Thanks!

• I came across this old question of yours. Not sure what exactly the problem was, but $\mathrm{Tr}(\mathbf R^2)$ does not have to be between $0$ and $1$: it measures the total variance of your components. To get a proportion of explained variance you need to divide it by the total variance in the dataset, i.e. by the trace of the original covariance matrix. Then you should get a number below $1$. Does this answer your question? – amoeba Jan 27 '15 at 15:39