EasyDeepLearn

How do you cluster mixed numeric + categorical data?

hard

Answer

  • (1) Gower distance — averages appropriate distances per feature type (Manhattan for numeric, matching for categorical).
  • (2) k-prototypes — extends k-means with categorical dissimilarity.
  • (3) Embed categorical as one-hot / target encoding, scale numerics, then k-means (loses interpretability).
  • (4) UMAP with metric='gower' → then cluster in embedding.
  • Most production tabular clustering uses Gower + PAM or k-prototypes.
Check yourself — multiple choice
  • One-hot only
  • Gower distance / k-prototypes / one-hot + scale + k-means / UMAP embedding; Gower + PAM common in tabular practice
  • Same as k-means
  • Random

Mixed data: Gower distance / k-prototypes / UMAP; not naive Euclidean.

#clustering#similarity

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions