3
$\begingroup$

I am performing clustering by Gaussian Mixture model using EM algorithm in R. U use the mclust package. My data (205 observations and 25 variables) has both categorical and numerical variables. How do I deal with that problem?

My first thought is to transform my categorical variables to binary variables and then standardize the numerical variables in my data set. Is there any problem with that approach from a theoretical point of view?

$\endgroup$
2
$\begingroup$

Gaussian distributions are continuous distributions.

There is no meaningful way to apply this famous "bell shaped curve" onto categorical data - binary encoding clearly does not make sense either. You have to find something else to use instead of Gaussians...

So instead of hacking to make your data fake Gaussian, you should rather make the algorithm match your data and problem.

$\endgroup$
  • $\begingroup$ Do you have any suggestions on what algorithms would be a better fit for handling continuous and categorical values? $\endgroup$ – Jonathan B. Oct 18 at 14:34
  • $\begingroup$ The EM algorithm is fine, but you'll need to enhance it with a multinomial distribution, for example. That should be straightforward, just a little bit of math an a few lines of code afterwards. $\endgroup$ – Anony-Mousse Oct 18 at 15:15

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.