Most Correlated Feature Pairs

easy
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 9. Everything before it counts as cleared.

Implement top_pairs(X, names, k) returning the k feature pairs with the largest absolute Pearson correlation, as a list of (name_a, name_b, r) with name_a before name_b in the original column order. Sort by |r| descending, then by the pair's column indices. Columns with zero variance are skipped.

#eda#correlation#feature-selection2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Most Correlated Feature Pairs · TechGradify