Back to Labs

Explore the Ionosphere

Guided project · 14 steps · Principal component analysis

About

Radar returns from the ionosphere (Johns Hopkins). You reduce 34 continuous features to a few components and see whether "good" vs "bad" returns separate in PC space.

Data

Loaded from /datasets/ionosphere/ionosphere.data. No missing values. Labels are for visualization only—PCA itself is unsupervised. Source dataset is licensed under CC BY 4.0 with attribution to UCI.

Task

Standardize features, fit PCA, read a scree plot, project onto PC1–PC2, color by class, and inspect which original attributes load strongly on PC1.


Sign in to run cells and save progress. Log in or sign up.

Cell 1

Step 1: Imports

Cell 2

Step 2: Data path

Cell 3

Step 3: Load the CSV

Cell 4

Step 4: Shape and head

Cell 5

Step 5: Class balance

Cell 6

Step 6: Feature matrix and color labels

Cell 7

Step 7: Scale features

Cell 8

Step 8: Fit full PCA (all components)

Cell 9

Step 9: Scree plot

Cell 10

Step 10: Two-component PCA

Cell 11

Step 11: 2D projection scatter

Cell 12

Step 12: Variance captured in 2D

Cell 13

Step 13: PC1 loadings (which features matter)

Cell 14

Step 14: Bar chart of top PC1 loadings