Draw your dataset — components update in real time
Click or drag to place points. PC1 (red) points in the direction of greatest spread; PC2 (green) is perpendicular.
feature space
NOISE LEVEL medium
PRESETS
0
Points
—
Corr. r
VARIANCE EXPLAINED
add points to compute
PC1
PC2
Data
Add at least 10 points, or use a preset above.
Step 02
Project onto fewer dimensions
Reduce from 2 components to 1. Red lines show reconstruction error — the information lost in compression.
projection
COMPONENTS KEPT 2
INFORMATION
100%
Kept
0%
Lost
Original
Projected
Error
Use 2 components to keep all information.
Step 03
Why StandardScaler matters
Two correlated variables with different units. Drag the slider to change the scale ratio — watch PCA get misled, then fix it with standardisation.
SCALE RATIO (X : Y)
1× (equal)
1× (equal scale)← drag to increase ratio →64× (huge difference)
✕ Without scaling
✓ With StandardScaler
VARIANCE — RAW
VARIANCE — SCALED
At equal scales, raw and scaled PCA are identical — PC1 captures the real correlation. Drag the slider right to see what happens as the scales diverge.