Search code examples
pythonmathmachine-learningscikit-learnpca

Quality of PCA in scikit-learn


I use PCA to transform my features in oder to reduce the number of dimensions. In order to tune the number of dimensions I need to know how well the original features are described by the PCA. How can that be determined in scikit-learn?


Solution

  • I think you can examine the explained_variance_ratio_ attribute after fitting the PCA object to see how much variance are captured by each PC.