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

后端 未结 5 555
生来不讨喜
生来不讨喜 2021-01-31 20:19

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 w

5条回答
  •  太阳男子
    2021-01-31 20:50

    I assume that by saying "a primary feature" you mean - had the biggest impact on the class. A nice exploration you can do is look at the coordinates of the cluster centers . For example, plot for each feature it's coordinate in each of the K centers.

    Of course that any features that are on large scale will have much larger effect on the distance between the observations, so make sure your data is well scaled before performing any analysis.

提交回复
热议问题