Skip to main content
1 of 2
Doug Fir
  • 1.6k
  • 1
  • 19
  • 36

Appropriate clustering algorithm with mixed data types

I have a customer data set with several features. These features have mostly different meanings e.g.

  • (Currency / Money) Customer monthly spend in $
  • (Count) Quantity of service x customer has active with us
  • (Count) Quantity of service y that customer has with us
  • (Boolean) Is customer a premium services customer
  • (Boolean) Is customer some other kind of customer boolean
  • (Time) Customer tenure in months
  • (Time but entirely different meaning) Average time in a month spent using our call center

I had built a script using simple KMeans only because I've used it before and it's simple to understand.

Then, a post I came across told me to scale my data, that makes sense. But then I did some more research and found that KMeans is not ideal for clustering on binary fields. I have some binary fields, but not all my data are binary. The example features above pretty much cover the nature of the features that I have in my data set.

Can I still use Kmeans for clustering? Are there some more appropriate algorithms to cluster data of this nature?

Doug Fir
  • 1.6k
  • 1
  • 19
  • 36