Skip to content
Advertisement

How to get the cluster label when aplying Fuzzy C-Means clustering pyclustering?

I need to cluster data using the Fuzzy C-Means. So, I use fcm from pyclustering.cluster.fcm. So, I would like to know if there is a way to get the labels.

JavaScript

Advertisement

Answer

I have tried it this way, and it works, but I do not think that it is a perfect answer

JavaScript

However, I think I have another way to do that, and it is faster. As the result is the index in every cluster. So, I used loc[df.index[results[i]]

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement