1. Learn
  2. /
  3. Courses
  4. /
  5. Explainable AI in Python

Connected

Exercise

Feature importance in clustering with ARI

Leverage the Adjusted Rand Index (ARI) to quantitatively measure the impact of each feature's removal on cluster assignments in the customer dataset you've worked with in the previous exercise, pre-loaded in X.

The adjusted_rand_score() function and the column_names variable have been pre-loaded for you.

Instructions

100 XP
  • Derive the original cluster assignments in original_clusters.
  • In the for loop, remove features one by one and save the result in X_reduced.
  • Derive the reduced_clusters by applying K-means on X_reduced.
  • Compute the feature importance based on ARI between the reduced_clusters and the original_clusters.