Unsupervised Learning & Clustering

9 tutorials· Ordered reading path

Unsupervised learning finds patterns without labels. This path covers the major clustering and mixture model techniques, from hard K-means assignments to soft probabilistic models.

You will see how the EM algorithm unifies several methods, how hidden Markov models extend clustering with memory, and how dimensionality reduction helps visualise high-dimensional clusters.

1

From K-Means to GMM: Hard vs Soft Clustering

K-Means from scratch and its connection to GMMs through EM. Hard vs soft assignments, the distortion objective, and when each approach wins.

2

The EM Algorithm: An Intuitive Guide with the Coin Toss Example

Learn the Expectation-Maximisation algorithm through the classic two-coin problem. Understand soft assignments, weighted MLE, and why EM always converges.

3

Gaussian Mixture Models: The EM Algorithm in Practice

Implement Gaussian Mixture Models from scratch using the EM algorithm. Cluster Old Faithful eruptions and understand responsibilities and convergence.

4

Hidden Markov Models: When Clusters Have Memory

Hidden Markov Models via the weather-umbrella analogy. Forward and Viterbi algorithms from scratch, stock market regime detection, and HMM vs K-Means.

5

LDA vs PCA: Supervised vs Unsupervised Reduction

PCA vs Fisher's LDA on the Iris dataset. When unsupervised reduction fails, why labels matter, and the eigenvalue problem behind both methods.

6

Probabilistic PCA, EM-PCA, Bayesian PCA, Factor Analysis

Probabilistic PCA as a latent variable model. EM-PCA, Bayesian PCA with ARD that picks dimensionality automatically, and Factor Analysis. From scratch in NumPy.

7

SVD for Recommender Systems: Matrix Factorisation in NumPy

Build a recommender from scratch with the SVD: factorise a user-item ratings matrix, tune the rank, and beat mean baselines on real Jester data.

8

MCMC for Mixture Models: Inferring Earthquake Regimes

Build a Metropolis-Hastings sampler from scratch to infer hidden regimes in earthquake data. Full posterior distributions instead of point estimates.

9

Anomaly Detection from Scratch: 3 Detectors Compared

Build three unsupervised anomaly detectors from scratch: Isolation Forest, One-Class SVM and an autoencoder. See why ROC-AUC lies on imbalanced fraud data.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

Unsupervised Learning FAQ

Common questions about this topic