Closed Eugenia77 closed 2 years ago
So kmodesCentroids
is supposed to be the categorical part of the centroids, and you're getting it from the trained model using model._enc_cluster_centroids
, right?
That variable should hold a matrix of k (number of centroids) by n (number of categorical variables). It seems that for you it's 1-dimensional, which looks wrong to me.
Hello,
I am actually trying to run kpototypes on a mix of ordinal, nominal and continuous data (the continuous are very few), using "chi-square" or "ng_dissim" for categorical dissimarity (number of clusters=2) and then calculate silhouette score separately for the kMeans part and the kModes "parts" of the algorithm. It all seems to work perfectly fine until the decoding part kicks in, where decoder_centroids() fails with the following message
IndexError Traceback (most recent call last)