nicodv / kmodes

Python implementations of the k-modes and k-prototypes clustering algorithms, for clustering categorical data
MIT License
1.23k stars 416 forks source link

Value Error when I pass a NumPy array as init parameter #196

Closed Francis-oa7 closed 8 months ago

Francis-oa7 commented 9 months ago

I save the cluster centres from my initialization for future use with pickle. But when a pass the cluster centres I get an error: ValueError: invalid literal for int() with base 10: 'Medicine'. I have attached my code.

code

Francis-oa7 commented 8 months ago

Well I found the problem. I was supposed to serialize "model._enc_cluster_centroids" and not "model._cluster_centroids".