on-internet
← Community

scikit-learn: Finding the features that contribute to each KMeans cluster

Stack Overflow ·

Say you have 10 features you are using to create 3 clusters. Is there a way to see the level of contribution each of the features have for each of the clusters? What I want to be able to say is that for cluster k1, features 1,4,6 were the primary features where as cluster k2's primary features were 2,5,7. This is the basic setup of what I am using: k_means = KMeans(init='k-means++', n_clusters=3, n_init=10) k_means.fit(data_features) k_means_labels = k_means.labels_

Comments

Sign in or sign up to comment and upvote.

No comments yet.