Questions tagged [kmodes]

5 questions
2
votes
1 answer

K-Modes Cluster Validation

I've so far found very few options for internal cluster validation using k-modes. However, I recently found a paper which use a validation metric known as the: SW/SB ratio. SW = standard deviation on the group. SB = standard deviation between the…
EB3112
  • 235
  • 1
  • 6
2
votes
0 answers

Why can't my k-prototypes clustering model be pickle-saved when based on a user-defined distance?

Because the dataset in which I wish to find clusters contains a mix of numerical and categorical variables, I'm using the k-prototypes algorithm to compute centroids. By default, the method defines a distance between two data points as a (weighted)…
Emilien
  • 21
  • 2
1
vote
1 answer

assign cluster membership to new data using kmodes

Looking at this code from here: import numpy as np from kmodes.kmodes import KModes # random categorical data data = np.random.choice(20, (100, 10)) km = KModes(n_clusters=4, init='Huang', n_init=5, verbose=1) clusters = km.fit_predict(data) #…
cs0815
  • 16,751
  • 45
  • 136
  • 299
0
votes
1 answer

Python code for automatic execution of the Elbow curve method in K-modes clustering

having the code for manual and therefore possibly wrong Elbow method selection of optimal number of clusters when K-modes clustering of binary df: cost = [] for num_clusters in list(range(1,10)): kmode = KModes(n_clusters=num_clusters, init =…
Mr.Slow
  • 490
  • 1
  • 1
  • 16
0
votes
0 answers

Do we need standardization in K-prototypes algorithm

I want to use the K-prototype algorithm (a type of KNN algorithm used for mixed data :numerical and categorical data) for a clustering problem. The algorithm handles the categorical values without numerical encoding, so I don't need to encode them…