<p>I highly recommend the following paper by Gavish and Donoho: <a href="http://arxiv.org/abs/1305.5870" rel="noreferrer"><em>The Optimal Hard Threshold for Singular Values is 4/sqrt(3)</em></a>. </p>

<p>I posted a longer summary of this on <a href="https://stats.stackexchange.com/questions/44060/choosing-number-of-principal-components-to-retain/189645#189645">CrossValidated <em>(stats.stackexchange.com)</em></a>. Briefly, they obtain an optimal procedure in the limit of very large matrices. The procedure is very simple, does not require any hand-tuned parameters, and seems to work very well in practice.</p>

<p>They have a nice code supplement here: <a href="https://purl.stanford.edu/vg705qn9070" rel="noreferrer">https://purl.stanford.edu/vg705qn9070</a></p>
How many principal components to take?
<p>I know that principal component analysis does a SVD on a matrix and then generates an eigen value matrix. To select the principal components we have to take only the first few eigen values. Now, how do we decide on the number of eigen values that we should take from the eigen value matrix?</p>