GMM Behavioural Clustering

Description

Fits Gaussian mixture models to behavioural log features to find probabilistic user segments, choosing the number of segments by BIC and giving each user membership probabilities.

Gaussian mixture models assume the data are generated by a mixture of several multivariate normal distributions, each representing a latent segment. Fitted by expectation-maximisation, a GMM gives each user a probability of belonging to each segment rather than a hard label, and allows segments of different shapes and sizes, unlike k-means. The number of components is chosen with the Bayesian Information Criterion, balancing fit and complexity. Applied to behavioural features derived from logs, such as frequency, feature breadth, session length and recency, GMMs produce data-driven behavioural segments that can anchor or test personas. Rigour comes from careful feature engineering and scaling, BIC-based model selection, stability checks across samples, and qualitative validation of segments.

Attributes

Loss type
Latent
Effort
Weeks

Steps

  1. Define the behavioural question and engineer features from logs over a fixed window, such as activity frequency, feature usage breadth, session depth and recency.
  2. Transform and standardise features (for example log-transform skewed counts) and reduce dimensionality if needed with PCA.
  3. Fit GMMs across a range of component numbers (for example 2 to 10) and covariance types, selecting the model with the lowest BIC.
  4. Check stability by refitting on bootstrap samples or different time windows, and inspect membership probabilities for ambiguous users.
  5. Profile each segment by feature means and outcomes such as retention or revenue, and name segments descriptively.
  6. Validate segments qualitatively by interviewing users with high membership probabilities in each segment before turning them into personas.

Sources

  • lifelines (survival)
  • scikit-learn (GMM, LDA, UMAP)
  • pandas (log parsing)
  • matplotlib
  • plotly
  • Schwarz (1978) Estimating the dimension of a model, Annals of Statistics
  • The Inquiry Series, Vol III, Ch 51
  • The Inquiry Series, C4 — Behavioural Log Analysis — From Clickstreams to Personas

Also known as

  • Gaussian mixture model segmentation
  • Probabilistic behavioural personas
  • Model-based clustering

Categories

  • Analytics & Behaviour
  • Computational & Machine Learning