1. Learn
  2. /
  3. Courses
  4. /
  5. Preprocessing for Machine Learning in Python

Connected

Exercise

Checking for correlated features

You'll now return to the wine dataset, which consists of continuous, numerical features. Run Pearson's correlation coefficient on the dataset to determine which columns are good candidates for eliminating. Then, remove those columns from the DataFrame.

Instructions

100 XP
  • Print out the Pearson correlation coefficients for each pair of features in the wine dataset.
  • Drop any columns from wine that have a correlation coefficient above 0.75 with at least two other columns.