In this article, I am going to show you how to choose the number of principal components when using principal component analysis for dimensionality reduction.
In the first section, I am going to give you a short answer for those of you who are in a hurry and want to get something working. Later, I am going to provide a more extended explanation for those of you who are interested in understanding PCA.