Determining Optimal Components

Which number of principal components balances data reduction with information retention? The process of principal component selection addresses this by identifying the optimal subset of components that capture most of the original data's variance while significantly reducing dimensionality. This decision is critical because too few components can lead to significant information loss, while too many components might retain noise and defeat the purpose of dimensionality reduction.

Visualizing Variance: The Scree Plot

A scree plot is a line plot that displays the explained variance for each principal component, ordered from largest to smallest. It helps visualize how much information each successive component contributes. To interpret a scree plot, look for an 'elbow point' where the slope of the line changes dramatically, flattening out. Components before this elbow are typically considered the most significant, as they explain a substantial amount of variance, while subsequent components contribute much less.

Scree Plot and Cumulative Explained Variance
This plot shows the individual explained variance ratio for each principal component, revealing an 'elbow' where the gain in explanation diminishes. It also displays the cumulative explained variance, indicating how much total information is retained as more components are added.
Loading chart...
Key Insight: The 'elbow' in the individual explained variance helps identify the optimal number of components, often aligning with a high cumulative explained variance threshold.
Check Your Understanding
Based on a scree plot, what indicates the optimal number of components?

The Kaiser Criterion: A Rule of Thumb

The Kaiser criterion offers a simple quantitative rule for selecting principal components. It suggests retaining only those components whose eigenvalues are greater than 1. The rationale behind this rule is that any component with an eigenvalue less than 1 explains less variance than a single original variable, assuming the data has been standardized. Therefore, such components are often considered to contribute little meaningful information.

📐 Kaiser Criterion

Retain principal components where the eigenvalue λ>1\lambda > 1.

Setting a Cumulative Explained Variance Threshold

Another common quantitative approach involves setting a cumulative explained variance threshold. This method focuses on retaining enough components to explain a predefined percentage of the total variance in the dataset, typically between 85% and 95%. For example, if you aim to retain 90% of the information, you would select the minimum number of principal components whose combined explained variance ratio sums up to at least 0.90. This method is straightforward and ensures a specific level of information retention.

Implementing Component Selection in Python

pythonPCA and Component Selection
Try It Yourself
Modify the code to find the number of components required to explain 95% of the total variance. How many components are selected now?
python

Beyond the Rules: Context and Trade-offs

No single method for principal component selection is universally perfect; the best approach often depends on the specific dataset and the problem's context. The scree plot provides a visual, intuitive guide, but the 'elbow' can sometimes be ambiguous. Quantitative rules like the Kaiser criterion offer clear cutoffs but might be too aggressive or too conservative depending on the data's structure. Similarly, a cumulative variance threshold is straightforward but requires an arbitrary choice of percentage. Ultimately, domain knowledge plays a crucial role in making an informed decision, as it helps interpret the significance of components and the acceptable level of information loss for a given application.

Comparing Principal Component Selection Methods
MethodProsCons
Scree PlotProvides a visual, intuitive understanding of variance contribution.The 'elbow' point can be subjective and hard to pinpoint clearly.
Kaiser CriterionOffers a simple, objective rule (eigenvalue > 1).Can be overly simplistic; may retain too many or too few components depending on data structure.
Cumulative Explained Variance ThresholdEnsures a specific percentage of total variance is retained.Requires an arbitrary choice for the variance threshold (e.g., 85%, 90%).
A comparison of common methods for determining the optimal number of principal components.
Key Takeaways
  • Scree plots visually display explained variance per component, with the 'elbow' indicating an optimal cutoff.

  • The Kaiser criterion suggests retaining components with eigenvalues λ>1\lambda > 1, meaning they explain more variance than a single original variable.

  • A cumulative explained variance threshold selects the minimum number of components needed to reach a desired percentage of total variance (e.g., 90%).

  • Python's sklearn.decomposition.PCA allows easy calculation and plotting of explained variance for component selection.

  • No single method is universally superior; the best choice balances data reduction with information retention, often guided by domain knowledge and the specific problem context.

← All lessons in Principal Component Analysis

Ready to keep this from fading?

Bitelrn turns lessons like this into a full course — quizzes, a knowledge map, and spaced review.

Get started free