Skip to content

Track T24

Discover

Clusters, embeddings, anomalies and topics.

Unit 1Before you cluster

· 2 lessons
  1. 1Finding structure when nothing is labeledDiscover answers questions that have no outcome column. Learn which question you are asking, and what you can and can't conclude from the answer.Introductory · 9 min
  2. 2Do these rows clump at all?Clustering always finds clusters. The Hopkins statistic and a VAT image check whether there is anything to find before you go looking.Applied · 10 min

Unit 2Finding segments

· 17 lessons
  1. 3k-means, and why scaling decides the answerWatch k-means assign and move, see where it fails, and find out how one unscaled column can take over the whole clustering.Applied · 12 min
  2. 4How many clusters?The elbow, silhouette, gap statistic and BIC ask different questions, and clear structure shows up on more than one of them.Applied · 11 min
  3. 5Hierarchical clustering and reading a dendrogramBuild a tree of merges instead of fixing k in advance, cut it where you need to, and see how the linkage changes the tree.Applied · 11 min
  4. 6Density-based clusters: DBSCAN, HDBSCAN and OPTICSClusters as dense regions of any shape, with noise as a real answer. Learn to set the radius and when to let HDBSCAN or OPTICS handle varying density.Applied · 12 min
  5. 7Mixture models and soft assignmentsA Gaussian mixture assigns each row a probability for every group, handles elliptical overlap, and gives you a likelihood to compare models with.Applied · 12 min
  6. 8Are your segments real, and what do they mean?Test stability under resampling, compare with known groups honestly, profile segments without double dipping, and name them only as far as the evidence allows.Applied · 13 min
  7. 20k-means and k-medoids for big, messy or directional dataMini-batch, k-medians, spherical and trimmed k-means, and CLARA and CLARANS for k-medoids — what each changes about the fit and when to reach for it.Applied · 12 min
  8. 21Divisive trees, BIRCH, k-center and steadier ways to choose kBuild a tree top-down with DIANA or compress large data with BIRCH, pick representatives that leave no row far away with k-center, and choose k by stability (prediction strength) or ICL.Applied · 13 min
  9. 22Soft memberships and categories: fuzzy c-means and k-modesTwo ways past k-means' assumptions. Fuzzy c-means gives every row a membership in every cluster; k-modes clusters categories directly, with k-prototypes adding numbers.Applied · 12 min
  10. 23Shapes, peaks and exemplars: spectral clustering, mean shift and affinity propagationThree clusterers that drop k-means' round-blob picture. Spectral clustering follows connected shapes, mean shift finds density peaks without a k, and affinity propagation picks real rows as exemplars.Applied · 14 min
  11. 24Mixtures for counts, directions, answers and outliersA Gaussian mixture assumes bell-shaped, continuous groups. Learn the mixtures that fit counts, directions, categorical answers, heavy tails and wide data, and how ICL tells a good density from a good clustering.Applied · 14 min
  12. 25Deep clustering: DEC, IDEC and a mixture-prior VAELet a neural network shape the space it clusters in. DEC and IDEC refine an autoencoder around k centers; VaDE gives a VAE a mixture prior. How each trains, and why tight clusters in a learned space aren't proof.Applied · 12 min
  13. 26Pure types and a PCA with a likelihood: archetypes and probabilistic PCADescribe every row as a mix of a few extreme profiles, and give PCA a likelihood so BIC can choose the number of components and fill missing values.Advanced · 12 min
  14. 27Biclusters: rows that agree on some columnsWhen no grouping of rows fits every column, look for blocks instead. Cheng–Church finds coherent blocks one at a time; spectral co-clustering and the checkerboard split rows and columns together.Applied · 12 min
  15. 28Communities and blocks: who links with whom in a networkFind groups of densely linked nodes with Leiden, Louvain, label propagation, Markov clustering and Infomap, read modularity honestly, then fit a stochastic blockmodel to find blocks that link alike, such as a core and its periphery.Applied · 15 min
  16. 29Clusters that moveStream clustering replays rows in time order and keeps small summaries that fade with age, so clusters can be born, drift and end. Learn to read cluster evolution and score each window before the model learns it.Advanced · 12 min
  17. 30Is the split real? Testing and comparing clusteringsTest whether two clusters beat one Gaussian cloud (SigClust), test cluster means without double dipping (selective inference), and compare two clusterings or two maps of the same rows with the right index.Advanced · 16 min

Unit 3Mapping the data

· 13 lessons
  1. 9Principal components, and what a loading saysFind the directions that hold the most variation, read a scree plot and a biplot, and avoid the units trap.Applied · 12 min
  2. 10Categories in the mix: Gower, PAM, MCA and FAMDReal tables mix numbers and categories. Choose a distance and a map that treat both fairly, and see how categories can take over.Applied · 12 min
  3. 11t-SNE and UMAP: what a map can and can't tell youThese maps keep neighbors together and quietly lose almost everything else. Learn what to read from them and how to check a map before you trust it.Applied · 12 min
  4. 12Other decompositions: ICA, NMF, kernel PCA, MDS and autoencodersEach of these asks something PCA can't. Learn what question each one answers, so you reach for the right one.Advanced · 14 min
  5. 18Learned representations: a VAE and a contrastive encoderTwo Experimental methods learn a compact summary of each row with a neural network. A variational autoencoder gives a map you can sample; a SCARF contrastive encoder learns by telling rows apart. What each optimizes and how to check it.Applied · 12 min
  6. 19Representations without negatives: SimSiam, BYOL, Barlow Twins, VICReg and SwAVThe contrastive encoder can swap InfoNCE for five objectives that never compare a row with other rows. What each one does to avoid collapse, which numbers show it worked, and why a label probe still decides.Advanced · 10 min
  7. 31Components you can name: sparse PCA, CUR and robust PCATrade a little variance for components built from a few variables or from real columns and rows, and split a table into its pattern and the odd cells that break it.Advanced · 14 min
  8. 32Maps from distances, and patterns in three-way tablesMake a map when all you have are distances, keep local neighborhoods with Sammon mapping, and find the few patterns behind a stores × products × months table with CP and Tucker decompositions.Advanced · 14 min
  9. 33Curved surfaces: Isomap, LLE, diffusion maps and PHATEWhen rows lie on a curved sheet, PCA folds it flat and mixes distant parts. Manifold maps follow the sheet instead. Learn which one to pick and how to tell when the neighbor graph lets you down.Advanced · 14 min
  10. 34PaCMAP, TriMap and checking a map on rows it hasn't seenPair-based maps keep neighbors like UMAP while holding on to more of the overall layout. Then two checks every map deserves - neighborhood curves over many sizes, and a held-out test of how many components are real.Advanced · 12 min
  11. 35A map that can bend: the GP latent variable modelThe GPLVM places rows so every variable is a smooth function of their positions. With a linear kernel it is probabilistic PCA; with a radial basis kernel the map can bend. Experimental.Advanced · 10 min
  12. 36Features from a pretrained modelTurn a column of images, sounds or texts into number columns with a frozen encoder, and know what the app does to each file before the model sees it.Applied · 10 min
  13. 37Separating sounds and scoring the resultSplit a recording into component tracks with NMF on its spectrogram, then score separated signals against the true sources with SI-SDR, its improvement over the mixture, and BSS Eval's SDR, SIR and SAR.Applied · 14 min

Unit 4Anomalies and patterns

· 17 lessons
  1. 13Spotting anomalies, and what a flag meansIsolation forest, LOF, ECOD, one-class SVM and robust covariance each define "unusual" differently. Learn to compare them and to treat a flag as a question.Applied · 14 min
  2. 14Association rules, and why lift beats confidenceWhich items go together? Support, confidence and lift each answer part of that, and high confidence alone can be a trap.Applied · 11 min
  3. 15Topic models for a pile of textLDA and NMF turn a text column into themes and each document's mix of them. Learn to choose the number of topics, read coherence, and label topics honestly.Applied · 12 min
  4. 16Journeys and sequencesTurn an event log into the paths people take and what they do next. Read a flow diagram and a transition matrix without inventing causes.Applied · 10 min
  5. 17Topics from meaning with BERTopicBERTopic turns each document into an embedding, groups dense regions into topics and names them with class-based TF-IDF. Learn what the outlier topic means, when a pretrained embedder helps, and how much to trust the result.Advanced · 12 min
  6. 38Neighbors, angles and chains: more anomaly scoresSeven ways to turn a row's nearest neighbors into an anomaly score, from plain distances to angles, chains, selection probabilities and multi-scale counts, plus LoOP's 0–1 version of LOF.Applied · 14 min
  7. 39Clusters, tails and spheres: CBLOF, COPOD, HBOS and SVDDScore rows by their distance to large clusters (CBLOF), by how far into each column's tails they sit (COPOD, HBOS), or by their distance to an enclosing sphere (SVDD), and know what each one can't see.Applied · 12 min
  8. 40Anomalies by density: kernel density scoresScore each row by how thin the data are around it, with a kernel density estimate. Learn to set the bandwidth, why the row is left out of its own estimate, and how a copula density finds unusual combinations.Applied · 10 min
  9. 41Deep anomaly detectors: Deep SVDD and DAGMMTwo Experimental detectors learn what typical rows look like. Deep SVDD pulls them toward one point; DAGMM scores rows by a mixture density over a compressed space. What each optimizes, how each fails, how to check it.Applied · 12 min
  10. 42Calibrated alerts: flags with a known error rateA detector's own rule flags a fixed share of rows whether or not anything is wrong. Calibrate its scores against rows you take to be normal, and each flag comes with a false-alarm or false discovery rate you chose.Applied · 10 min
  11. 43Inspection anomalies on images: PaDiM, kNN and calibrated alarmsLearn what good parts look like from reference images, score every new image by how far it strays, calibrate the alarms so a good part is flagged at most 5% of the time, and watch the scores on a control chart.Applied · 14 min
  12. 44Which images look alike? Image embeddings, maps and neighborsTurn every image into a vector with a pretrained network, map the vectors in two dimensions, list each image's nearest neighbors, and check how well the vectors separate known classes before saving them for other methods.Applied · 10 min
  13. 45More topic models: PLSA, correlated topics, HDP, authors and online LDAFive more ways to find topics in a text column. Learn what each one adds to LDA, when it helps, and what to check before you trust it.Advanced · 14 min
  14. 46Topics that change over timeThe dynamic topic model lets each topic's words drift from one period to the next. Learn to set the drift, read first-versus-last top words, and tell a growing topic from a changing one.Advanced · 12 min
  15. 47Words known by the company they keep: word vectorsLearn a vector for every frequent word from the words around it, read nearest neighbors honestly, and see why counts beat word2vec on a small collection.Applied · 12 min
  16. 48Nodes known by their neighbors: node embeddings and link predictionGive every node of a network a vector from the network around it, check the vectors honestly by hiding edges, and see why a random network has nothing to predict.Applied · 13 min
  17. 49Suggesting causal structure: PC-stable and NOTEARSStructure learning proposes which variables could cause which. PC-stable removes links other variables explain away; NOTEARS fits a linear model with no loops. Both give hypotheses to question your DAG, never a DAG to claim.Applied · 14 min

Unit 5Clustering families

· 9 lessons
  1. 50Means, medians, medoids and the farthest row: what a partition minimizesk-means, k-medians, k-medoids, k-center and trimmed k-means all draw k groups, but each minimizes a different cost. The cost decides which rows matter most, what a center is and how outliers pull.Applied · 14 min
  2. 51Partitions at scale and in other geometriesMini-batch k-means, CLARA and CLARANS trade a little fit for much less work; spherical and kernel k-means change what "close" means. What each approximation assumes, and how to check that it held.Advanced · 13 min
  3. 52Soft and categorical partitions: memberships, typicalities, modes and prototypesFuzzy and possibilistic c-means give each row a degree of belonging; k-modes and k-prototypes cluster categories. What each cost forces, what its scores do and don't mean, and the balance you set yourself.Advanced · 13 min
  4. 53Hierarchies from Ward to CHAMELEON: merging, splitting and summarizingAgglomerative linkages, DIANA's splits and BIRCH's summaries all build a tree of clusters. CURE, ROCK and CHAMELEON change what "close" means for whole clusters. What each one assumes, and how to check a tree.Advanced · 15 min
  5. 54Density peaks and exemplars: DBSCAN to affinity propagationDBSCAN, OPTICS and HDBSCAN find dense regions, DENCLUE and mean shift climb density peaks, and affinity propagation elects exemplars. Which setting really picks the cluster count, and what noise means.Advanced · 15 min
  6. 55Clustering a graph: cuts, random walks, modularity and the map equationSpectral clustering, Markov clustering, Chinese Whispers, Louvain, Leiden, Infomap and correlation clustering each define a good community differently. Which question each objective answers, and which checks keep them honest.Advanced · 15 min
  7. 56Blocks and biclusters: models for who links with whom, and rows that agree on some columnsStochastic blockmodels explain a network with block-to-block link probabilities; degree correction stops hubs from forming their own block. Cheng–Church, spectral co-clustering and spectral biclustering cluster rows and columns together.Advanced · 14 min
  8. 57Mixture families: heavy tails, factors, infinite K, classes, counts and directionsEvery mixture says the data came from K component distributions. Which component suits Gaussian, heavy-tailed, wide, categorical, count and directional data, what a Dirichlet-process prior changes, and how to choose K honestly.Advanced · 15 min
  9. 58Deep clustering and deep anomaly scores: learning the space you cluster inDEC, IDEC, VaDE, JULE and DeepCluster learn a representation while they cluster; Deep SVDD and DAGMM learn one to score anomalies. How to spot collapse and a network confirming its own guesses.Advanced · 15 min

Unit 6Anomaly families

· 5 lessons
  1. 59Anomaly scores from density and distance: KDE, copulas, MCD, kNN, LOF and LoOPSix ways to say a row sits where the data are thin, globally or locally. What each score assumes about normal data, why units and neighbors change the answer, and why none of these scores is a probability until you check it.Advanced · 15 min
  2. 60Angles, chains, clusters, selection and scale: five more anomaly scoresABOD looks at the spread of angles, COF at chains of neighbors, CBLOF at small clusters, SOS at who would pick a row as a neighbor, and LOCI at counts across radii. What each one sees that plain distance misses, and its blind spot.Advanced · 14 min
  3. 61Isolation, tails and boundaries: forests, per-column surprise and one-class fencesIsolation forests count random cuts, HBOS, COPOD and ECOD add up how surprising each column is, and one-class SVMs and SVDD draw a fence around normal data. What each assumes, what each misses, and what their settings really control.Advanced · 15 min
  4. 62From score to alarm: thresholds, reference rows and who gets flaggedEvery detector in this unit ranks rows; none of them raises alarms on its own. The checks that turn a ranking into an alarm you can defend, which settings only look like error rates, and why false alarms pile up on some groups.Advanced · 13 min
  5. 63Lab: a distance score is not an alarm thresholdThe clustering chapter's second lab. A round-number cutoff on an anomaly score flags far more normal rows than it sounds like; calibrating on held-out normal rows gives the false-alarm rate you asked for.Advanced · 25 min

Unit 7Checking clusters

· 3 lessons
  1. 64Validity indices: silhouette, Calinski–Harabasz, Davies–Bouldin, gap and HopkinsInternal indices score a partition without labels, and the Hopkins statistic asks whether there is anything to cluster. What each formula rewards, the geometry it quietly assumes, and why the best score is not evidence that clusters exist.Advanced · 14 min
  2. 65Is the structure real? SigClust, selective inference, prediction strength and stabilityA clustering algorithm always returns clusters. Four checks ask whether they mean anything: a test against one Gaussian, a p-value that allows for choosing the clusters, agreement on new rows, and survival under resampling.Advanced · 15 min
  3. 66Lab: a higher silhouette, the wrong groupsThe clustering chapter's first lab. On two noisy moons, k-means scores the higher silhouette while a density method recovers the groups you meant. Explore it, then compute both scores yourself in Python or R.Advanced · 25 min