Clustering a Table of Mixed Continuous and Categorical Features
Problem statement
A subscription business wants to segment its customers with an unsupervised clustering method. Each customer row mixes continuous variables (age, annual spend in USD) with discrete ones: region (north, south, east, west), plan tier (basic, standard, premium) and a yes/no flag for whether the customer uses the mobile app.
Which statement is true?
A. K-means can be applied to the table as it is, because centroids can average every column.
B. Hierarchical clustering with Gower distance can be applied to the table as it is.
C. Hierarchical clustering with Euclidean distance can be applied to the table as it is.
D. K-means becomes valid once each categorical column is replaced by integer codes 0, 1, 2.
Show hint
What does each algorithm actually need from the data: coordinates it can average, or only a distance between every pair of rows?
Relevant roles: ML Engineer, Data Scientist and Applied Scientist.
Related free problems
- K-Means ClusteringML CodingMedium