Most Correlated Feature Pairs

easy
Unit 8 · Metrics0/3 to milestone

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