0
$\begingroup$

I am doing a clustering analysis using K-means and I have around 6 categorical variables that I want to consider in the model. When I transform these variables as dummy variables (binary values 1 - 0) I got around 20 new variables. Since two assumptions of K-means are Symmetric distribution (Skewed) and same variance and mean (scale). Do I need to transform these variables?

$\endgroup$
1
  • $\begingroup$ Welcome to DataScienceSE. As far as I know there's not a lot of transformation you can do if you have binary variables, anyway. Since you have only 6 categorical variables and this leads to only 20 variables, I would start by simply counting the frequency of each combination of values (i.e. how many distinct instances). It's possible that you have a few very frequent cases which represent 99% of the data. $\endgroup$
    – Erwan
    Jun 10 '21 at 20:23
0
$\begingroup$

If you have exclusively binary variable you can use KModes, if you have both real and binary variables I would consider the KPrototypes algorithm. KModes use by default the hamming distance and prototype computation use the mod instead of the mean. KPrototypes mix both KMeans and KModes for each kind of features using euclidean and hamming for distance computation and mean and mod for getting both part of the prototypes.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.