The Interactive PCA Face Lab

Visualizing Dimensionality Reduction

Choose a Dataset

Select which type of data you'd like to analyze. The underlying structure in the data will affect the results of the PCA.

Stage 1: A Sea of Faces

Here are 100 faces. Each is defined by six features: nose length, mouth length, head width, head height, eye distance, and ear size. Can you spot any patterns?

Stage 2: Connecting Faces to Data

This table shows the numerical feature values for each face. Click on any row to see the corresponding face.

Face # Nose L. Mouth L. Head W. Head H. Eye Dist. Ear Size

Stage 3: Uncovering Feature Relationships

Are the features independent? The correlation matrix (left) shows the strength of the relationship between features (red is positive, blue is negative). The scatter plots (right) visualize these relationships directly.

Correlation Matrix

Feature Scatter Plots

Stage 4: Finding Principal Components (PCs)

PCA finds new, combined "meta-features" that capture the most variance in the data. The "scree plot" shows how much variance each PC explains. Use the sliders to see what each PC visually controls.

Scree Plot (Eigenvalues)

PC Feature Weights

This table shows how much each original feature contributes to a PC. Red is positive, blue is negative.

Stage 5: The Power of 2D Reduction

We can now plot every face using its principal components. Click any point to see the corresponding face on the right and highlight its position in all three plots.

PC1 vs PC2

PC1 vs PC3

PC2 vs PC3

Selected Face

Click a point on any plot to view a face.

Congratulations!

You've successfully reduced 6 dimensions of data down to 2, discovering the hidden structure of the faces. This is the core idea behind PCA and dimensionality reduction. You can now restart with a completely new set of faces!