2

For PCA, we can print out the number of components vs % variance explained, like in the following picture:

enter image description here

And as human practitioners, we're typically instructed to choose the number of components at the inflection point of the curve close to explaining all the variance.

Is there an algorithm that looks at the variance explained, and just automatically choose where that inflection point should be?

foobar
  • 643
  • 1
  • 7
  • 17
  • As your vertical axis shows proportion, the label % should be removed. Or 0.6(0.1)1 edited to 60(10)100. – Nick Cox Mar 06 '19 at 19:17
  • 1
    Possible duplicates: https://stats.stackexchange.com/questions/56052/pca-using-princomp-in-matlab, https://stats.stackexchange.com/questions/83789/choosing-number-of-pca-components-when-multiple-samples-for-each-data-point-are, https://stats.stackexchange.com/questions/189465/a-paper-mentions-a-monte-carlo-simulation-to-determine-the-number-of-principal, https://stats.stackexchange.com/questions/197071/removing-nuisance-pca-components-from-the-fmri-data, https://stats.stackexchange.com/questions/51228/problem-with-parallel-analysis-with-psych – kjetil b halvorsen Nov 02 '20 at 10:27
  • 1
    Yes, you can try Bayesian PCA ([paper](https://papers.nips.cc/paper/1549-bayesian-pca.pdf)). It is able to automatically choose the latent dimensionality by maximizing marginal likelihood. – Monotros Apr 28 '19 at 23:06

1 Answers1

0

Parallel Analysis is the standard way to choose the number of components algorithmically. It creates a sampling distribution for each of the eigenvalues and performs a series of hypothesis testing.

Note that this is not the exact conceptualization you mentioned because PA is based on eigenvalues, not the proportions of explained variances.

LambdaPsi
  • 101
  • 3
  • 1
    I don't think parallel analysis implies any hypothesis testing, since it is based on randomly generated datasets on which we re-apply a PCA to check the distribution of the resulting eigenvalues. Could you clarify, please? – chl Nov 02 '20 at 10:40