Structured data
Clustering
customer segments, product groupings, cohort discovery
Find groups in data with no labels.
Linear algebra
Maximum likelihood
Information theory
Foundations
PCA is eigendecomposition; GMMs are maximum likelihood via EM; mutual information compares clusterings.
Frame the problem
Frame
Who will use the segments and for what. That decides how many and how interpretable.
Exploring the data
Cleaning the data
Data & labels
Encode & scale
Create features
Dimensionality reduction
Represent
Scaling matters here: distance-based methods are dominated by the largest-range feature. PCA for modelling, UMAP for looking.
Split the data
Split
Hold out a sample to test cluster stability.
Clustering
Gaussian mixtures & EM
Model
K-means first. DBSCAN when clusters are not blobs. GMM when you need soft membership.
Hyperparameter tuning
Train
The number of clusters is the hyperparameter. Elbow and silhouette are hints; the stakeholder is the judge.
Evaluating without labels
Interpretability
Evaluate offline
Silhouette for shape, then human inspection. Stability across resamples. Describe each segment by the features that separate it.
Evaluate online
Nothing unusual here.
Serving & release
Ship & monitor
Assignments drift. Decide when to re-cluster versus re-assign.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.